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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #5060

    Hi all,

    Thanks for this great plugins. I’d like to create a structure such that I got 3 levels of access :
    – Normal user (can access certains pages or not)
    – User manager
    – Admin

    Obviously, the admin can have access to all and the user to nothing in the User Role Editor plugin. But I’m blocked with the “User manager”. These users should be able to access the link “capabilities” in the “user” -> “all users” panel in WordPress admin, but I’d like them to be able to add secondary roles only, i.e. not change the main role or change anything in the roles structure



    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.