Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › Give "capabilities" access without granting ability to create/edit/change roles › Reply To: Give "capabilities" access without granting ability to create/edit/change roles
01/08/2018 at 02:34
#5061
Vladimir
Keymaster
Hi,
User manager with 2 capabilities:
– list_users,
– edit_users
does not see ‘Capabilities’ link under user role. It’s enough to open user profile to change a role(s) granted to user.
It’s possible to hide from such user manager a primary role controls using URE custom filter, like this:
add_filter('ure_users_select_primary_role', 'my_users_select_primary_role', 10, 1);
function my_users_select_primary_role($select) {
$select = false;
return $select;
}
This filter does not take effect for site superadmin.
You may add this code to the active theme functions.php file or setup it as a Must Use plugin.