Skip to content

Security, roles, and how user switching works

Learn how Switch User Login maintains WordPress security with role hierarchy checks, nonce verification, and safe session handling.

Switch User Login by Icegram is built with strict security safeguards. It enables effortless account switching for authorized administrators while ensuring that user permissions cannot be bypassed, passwords are never compromised, and session data remains secure.

Who can switch user accounts?

Account switching is strictly governed by WordPress user role capabilities:

User RoleSwitching CapabilityPermitted Target Accounts
Super Administrator (Multisite)Full network switchingCan switch to any user account on any network site including Administrators.
Site AdministratorStandard switchingCan switch to any user with equal or lower capabilities (Editors Authors Contributors Subscribers).
Editors Authors SubscribersNoneNo switching capability. Switched accounts cannot switch to anyone else.

Security architecture and best practices

The plugin adheres to core WordPress security standards:

  1. Nonce Verification on Every Action: Every switch and switch-back action is protected by a unique, time-limited WordPress security token (nonce). Links cannot be spoofed, shared, or executed via Cross-Site Request Forgery (CSRF).

  2. No Password Exposure: Passwords are never retrieved, decrypted, or displayed. The plugin authenticates user sessions using standard WordPress cookie authentication rather than credentials.

  3. Secure Session Isolation: When you switch to a user, the plugin safely retains your originating administrator session in a dedicated, secure cookie. The switched user profile never gains access to your administrative session tokens.

  4. Automatic Cookie Cleanup: If you log out of WordPress while switched, all associated switching tokens and session cookies are purged immediately. A subsequent login always requires full administrative credentials.

  5. Concurrent Switch Detection: If another administrator is already switched to the same user account, the plugin displays a warning notice to prevent unintended session collision or overlapping changes.