Change WordPress user roles and capabilities Forums How to or FAQ Remove superadmin role from the “change role to” menu in user listing Reply To: Remove superadmin role from the “change role to” menu in user listing

#4008
pyushika
Participant

WordPress built-in ‘administrator’ role is hidden from any drop-down list for single site administrators (without superadmin privilege) by default.

That’s good. But my problem is other way around. Users with ‘administrator’ role are capable of assigning superadmin role to self or to others.

If you wish to exclude another role(s) from access of user with ‘list_users’, ‘edit_users’ capabilities you can use “Block other roles access” add-on.

Thanks for pointing out this another wonderful feature of the plugin. I, however, failed to achieve what I need to even after trying this feature. Superadmin role is not being hidden from users having ‘administrator’ role. I, however, have created another role equivalent to ‘administrator’ role by copying its capabilities (and assigning few more) and superadmin role is being hidden from this new role.

May be I’m doing something wrong. Can you please look into it to point out what should I be doing to hide superadmin roles from users having administartor role?

Thanks!