Support » Plugin: User Role Editor » Turn Off Multiple Roles?

  • Resolved Andrew Tegenkamp

    (@andrewteg)


    Is it possible to turn off the ability to assign multiple roles to a user?

    We have multiple admins and don’t need this feature (though it is a really cool idea!) and would prefer to just have an option that turns it off. Is there a way to do this with a hook or filter as I don’t see anything in the Options?

    Ideally we’d like “Grant Roles” removed from the user screen and “Other Roles” from the user edit screen. That’s the only places I see this feature at the moment.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vladimir Garagulia

    (@shinephp)

    Fortunately, there are suitable filters:

    
    
    // Remove "Additional capabilities/Other roles" section from user profile and "Add new user" page
    add_filter('ure_show_additional_capabilities_section', 'hide_other_roles');
    function hide_other_roles($show) {
    
        $show = false;
        
        return $show;
    }
    
    // Remove "Grant Roles" button
    add_filter('ure_bulk_grant_roles', 'hide_grant_roles');
    function hide_grant_roles($grant) {
        $grant = false;
        
        return $grant;
    }
    

    Thanks, sorry I missed that!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Turn Off Multiple Roles?’ is closed to new replies.