Description
PinSwitch User Switcher helps plugin developers test role-based behavior without repeatedly hunting through the Users screen.
When you are building a plugin, you often need to jump between an admin account and a handful of fixed test users (Editor, Subscriber, Customer, etc.). Existing user switching plugins work, but they still make you find the same accounts in the user list every time. PinSwitch User Switcher adds a pinning layer on top of a complete, standalone switching implementation.
Switching
- Switch To — log in as another user instantly
- Switch Back — return to your original account
- Switch Off — log out while keeping the ability to switch back
- Standalone auth-cookie and session-token implementation (no dependency on User Switching or similar plugins)
- Smart redirects after switching — if the target user cannot access the page you were on, they are sent to the dashboard or homepage instead of an unauthorized error
Pinning
- Pin or unpin users from the Users list row actions or the admin bar All users tab
- Pins are stored per admin in usermeta (no custom database tables)
Admin bar panel
- Switch User menu on all wp-admin screens — opens on hover
- Pinned and All users tabs
- Search all users by username or email
- Infinite scroll loading (20 users at a time)
- Each row shows avatar, name, role, login, email, and a Switch To action
- Click a user row to open their profile; use Switch To to switch accounts
- Fixed-height, scrollable panel (no full-screen dropdown)
Profile & user screens
- Switch To button on every user edit screen (next to Add User)
- Switch To button in the Personal Options section of user profiles
Permissions
Users with the edit_users capability can pin users and switch accounts. Switch back uses cookie authentication and does not require the switched-in user to have elevated capabilities.
PinSwitch User Switcher is intentionally small: no audit log, no multisite-specific code, no CLI, no REST API layer, and no dependency on other switching plugins.
Screenshots



Installation
- Upload the plugin files to
/wp-content/plugins/pinswitch-user-switcher, or install through the WordPress plugins screen. - Activate the plugin through the Plugins screen.
- Go to Users, pin your test accounts using the Pin row action.
- During testing, open Switch User from the admin bar and click a pinned account.
FAQ
-
Who can use PinSwitch User Switcher?
-
Users with the
edit_userscapability can pin users, open the Switch User panel, and switch into other accounts. -
Does this replace User Switching?
-
Yes. PinSwitch User Switcher is standalone. It implements its own switch-to, switch-back, and switch-off flow using WordPress auth cookies and session tokens, so you do not need another switching plugin installed.
-
What happens if I switch to a user who cannot access the current admin page?
-
PinSwitch User Switcher checks whether the switched-in user can access the page you were on. If not, they are redirected to the admin dashboard (if they have admin access) or the site homepage — not an “Sorry, you are not allowed” error screen.
-
No. Pins are stored against your own user account and are visible only to you.
-
Does PinSwitch User Switcher work on Multisite?
-
Multisite is not a priority for v1. It may work incidentally but is not tested or supported.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“PinSwitch User Switcher” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “PinSwitch User Switcher” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.2.1
- Enqueue user-edit Switch To script via wp_enqueue_script instead of an inline script tag
1.2.0
- Rename plugin to PinSwitch User Switcher (slug: pinswitch-user-switcher)
- Migrate pinned users from the former QuickSwitch usermeta key
1.1.5
- Fix admin bar panel JavaScript error that showed “No users found”
1.1.4
- Show login and email on separate lines so long addresses are not truncated
1.1.3
- Open Switch User panel on hover instead of click
- Compact admin bar panel layout with email and role per user
- Click a user row to open their profile; use Switch To to switch accounts
1.1.2
- Add Switch Off to the admin bar profile menu when logged in as admin (not while switched)
1.1.1
- Show Switch Off for any switched user, not only accounts with edit_users
- Add switch-back links on the login screen, site footer, and Meta widget after Switch Off
- Allow switch back while logged out via admin-post nopriv handler
1.1.0
- Remove Users PinSwitch User Switcher settings page; pin and unpin from the Users list or admin bar panel
- Show pin/unpin success notices globally in wp-admin
1.0.6
- Place Switch To header button to the right of Add User on user edit screens
1.0.5
- Add Switch To button on user profile edit screens (header and Personal Options table)
1.0.4
- Redirect switched-in users to a safe fallback when they cannot access the current admin page
1.0.3
- Fix expired nonce / “link has expired” errors on switch links from the admin bar panel
1.0.2
- Clear list immediately on tab switch and search; show loading state only while fetching
1.0.1
- Replace native admin bar submenu with custom scrollable panel (tabs, search, infinite scroll)
- Redesign Users PinSwitch User Switcher settings page empty state and pin table
- Fix admin bar layout conflicts with WordPress core styles
1.0.0
- Initial release: standalone switching, pinning, admin bar menu, settings page, Users list row actions
