Support » Plugin: User Role Editor » Disable “Other Roles” (Select additional roles for this user)

  • Is it posible to disable/hide the option “Other Roles” or “Select additional roles for this user”, that appears in the “Profile Editor”?

    I dont want that other administrators can use this option.

    Thanks

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

    (@shinephp)

    You can use URE’s custom filters:

    
    /*
     * Hides Additional Capabilities section at user profile
     * and other roles section at the "Add new user" page.
     */
    
    add_filter('ure_show_additional_capabilities_section', 'ure_show_additional_capabilities_section');
    
    function ure_show_additional_capabilities_section( $show ) {
    
    /*  Remove comment if do not wish to apply this for administrators also  
        $lib = URE_Lib::get_instance();
        if ($lib->is_super_admin()) {
            return $show;
        }
    */            
        return false;
    }
    
    /*
     * Hides "Grant Roles" button at Users list page 
     */
    add_filter('ure_bulk_grant_roles', 'ure_bulk_grant_roles');
    
    function ure_bulk_grant_roles( $show ) {
    
    /*  Remove comment if do not wish  wish to apply this for administrators also  
        $lib = URE_Lib::get_instance();
        if ($lib->is_super_admin()) {
            return $show;
        }
    */
        
        return false;
    }
    
    Thread Starter sukinoz

    (@sukinoz)

    Thanks. I will try

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