Documentation
SwitchUser
Role Hierarchy

Role Hierarchy

SwitchUser never lets anyone switch "up" into a more powerful account.

Who Can Start a Switch

  1. Enable User Switching must be on.
  2. If Allowed Switcher Roles has roles checked, the user must have one of them. Otherwise they need the edit_users capability (administrators, by default). See Allowed Switcher Roles.

Which Accounts They Can Switch Into

SwitcherCan switch into
AdministratorAny account that isn't an administrator
Non-admin with edit_users (for example a customised Shop Manager)Any account that isn't an administrator and doesn't have edit_users
Other allowed rolesOnly accounts with a strictly lower role level, and never administrators or users with edit_users

Nobody can switch into their own account or into another administrator - not even other administrators.

On Multisite, "administrator" includes users who are an administrator on any site in the network, and network super admins.

Block Switching Into Administrators

This setting adds an explicit block on administrator targets. Because administrators are already protected by the rules above, it mainly serves as an extra safeguard and shows a clear message on administrator profiles.

Role levels come from the role definition (level_0 … level_10 capabilities). Custom roles without level capabilities are treated as level 0.