WordPress.org

Plugin Directory

User Switching

Instant switching between user accounts in WordPress.

What does "Switch off" mean?

Switching off logs you out of your account but retains your user ID in an authentication cookie so you can switch straight back without having to log in again manually. It's akin to switching to no user, and being able to switch back.

The Switch Off link can be found in your profile menu in the WordPress toolbar. Once you've switched off you'll see a Switch back link in the footer of your site.

Does this plugin work with WordPress Multisite?

Yes, and you'll also be able to switch users from the Users screen in Network Admin.

Does this plugin work with BuddyPress?

Yes, and you'll also be able to switch users from member profile screens and the member listing screen.

Does this plugin work with bbPress?

Yes, and you'll also be able to switch users from member profile screens.

Does this plugin work if my site is using a two-factor authentication plugin?

Yes, mostly.

One exception I'm aware of is Duo Security. If you're using this plugin, you should install the User Switching for Duo Security add-on plugin which will prevent the two-factor authentication prompt from appearing when you switch between users.

Does this work as a mu-plugin?

Yes, but you'll need to install user-switching.php into the root of your mu-plugins directory, not in the user-switching subdirectory. This is a limitation of WordPress.

What capability does a user need in order to switch accounts?

A user needs the edit_users capability in order to switch user accounts. By default only Administrators have this capability, and with Multisite enabled only Super Admins have this capability.

Can regular admins on Multisite installs switch accounts?

No. This can be enabled though by installing the User Switching for Regular Admins plugin.

Are any plugin actions called when a user switches account?

Yes. When a user switches to another account, the switch_to_user hook is called with the new and old user IDs passed as parameters.

When a user switches back to their original account, the switch_back_user hook is called with the new (original) and old user IDs passed as parameters. Note that the old user ID can be boolean false if the user is switching back after they've been switched off.

When a user switches off, the switch_off_user hook is called with the old user ID as a parameter.

See the plugin source code for complete hook documentation.

Requires: 3.1 or higher
Compatible up to: 4.3
Last Updated: 2015-8-27
Active Installs: 40,000+

Ratings

5 out of 5 stars

Support

5 of 6 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,2,2
100,2,2
100,1,1 100,1,1 100,1,1
67,3,2 100,1,1
100,1,1
100,1,1
33,3,1 0,1,0
100,1,1
100,1,1
100,1,1 100,1,1
100,6,6 100,3,3 100,2,2 100,1,1
100,2,2 100,3,3
100,7,7 100,3,3
100,6,6 100,6,6
100,1,1
100,5,5 100,1,1
100,1,1 100,2,2 100,3,3 100,1,1 100,7,7 0,1,0
100,6,6
100,5,5 80,5,4 100,2,2
100,1,1 100,1,1
100,2,2 100,2,2
100,2,2 100,1,1 100,2,2
100,1,1 100,1,1
100,1,1 100,7,7 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1
100,2,2
100,1,1
100,2,2 67,3,2
100,4,4
100,2,2 100,1,1 100,1,1 100,1,1
100,1,1
100,5,5
100,3,3 100,1,1
67,3,2 100,4,4
100,6,6 100,3,3 100,1,1 100,1,1
100,1,1
100,1,1 100,5,5
100,3,3 100,1,1 100,1,1
100,1,1