Version Description
- Show admin notices on all possible admin screens.
- Tweak the redirect location for BuddyPress user profiles.
=
Download this release
Release Info
Developer | johnbillion |
Plugin | User Switching |
Version | 0.8.4 |
Comparing to | |
See all releases |
Code changes from version 0.8.3 to 0.8.4
- readme.txt +21 -21
- user-switching.php +2 -12
readme.txt
CHANGED
@@ -4,18 +4,18 @@ Contributors: johnbillion
|
|
4 |
Tags: user, users, profiles, switching, wpmu, multisite, buddypress, become, user control, user management, user access, developer
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.7
|
7 |
-
Stable tag: 0.8.
|
8 |
License: GPL v2 or later
|
9 |
|
10 |
Instant switching between user accounts in WordPress.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
This plugin allows you to quickly swap between user accounts in WordPress at the click of a button. You'll be instantly logged out and logged in as your desired user. This is handy for test environments where you regularly log out and in between different accounts, or for
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
-
* Switch
|
19 |
* Switch back: Instantly switch back to your originating account.
|
20 |
* Switch off: Log out of your account but retain the ability to instantly switch back in again.
|
21 |
* It's completely secure (see the *Security* section below).
|
@@ -23,16 +23,16 @@ This plugin allows you to quickly swap between user accounts in WordPress at the
|
|
23 |
|
24 |
= Security =
|
25 |
|
26 |
-
* Only users with the ability to edit other users can switch user accounts
|
27 |
* Passwords are not (and cannot be) revealed.
|
28 |
-
*
|
29 |
* Full support for administration over SSL (if applicable).
|
30 |
|
31 |
= Usage =
|
32 |
|
33 |
1. Visit the *Users* menu in WordPress and you'll see a *Switch To* link next to each user.
|
34 |
2. Click this and you will immediately switch into that user account.
|
35 |
-
3. You can switch back to your originating account via the *Switch back* link on each dashboard screen
|
36 |
|
37 |
See the [FAQ](http://wordpress.org/plugins/user-switching/faq/) for information about the *Switch Off* feature.
|
38 |
|
@@ -48,19 +48,22 @@ See the [FAQ](http://wordpress.org/plugins/user-switching/faq/) for information
|
|
48 |
* Russian by R J
|
49 |
* Slovak by Max Samael
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
== Installation ==
|
52 |
|
53 |
-
|
|
|
|
|
54 |
|
55 |
1. Go to the *Plugins* menu and click *Add New*.
|
56 |
2. Search for *User Switching*.
|
57 |
-
3. Click *Install Now* next to the User Switching plugin.
|
58 |
4. Activate the plugin.
|
59 |
|
60 |
-
Alternatively, if you have the [WordPress Developer plugin](http://wordpress.org/plugins/developer/) installed then User Switching is a one-click install from the Tools -> Developer screen.
|
61 |
-
|
62 |
-
Failing that, see the guide to [Manually Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
|
63 |
-
|
64 |
== Frequently Asked Questions ==
|
65 |
|
66 |
= What does "Switch off" mean? =
|
@@ -89,7 +92,7 @@ A user needs the `edit_users` capability in order to switch user accounts. By de
|
|
89 |
|
90 |
No. This can be enabled though by installing the [User Switching for Regular Admins](https://github.com/johnbillion/user-switching-for-regular-admins) plugin.
|
91 |
|
92 |
-
= Are any hooks called when users switch accounts? =
|
93 |
|
94 |
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.
|
95 |
|
@@ -97,24 +100,22 @@ When a user switches back to their original account, the `switch_back_user` hook
|
|
97 |
|
98 |
When a user switches off, the `switch_off_user` hook is called with the old user ID as a parameter.
|
99 |
|
100 |
-
== Screenshots ==
|
101 |
-
|
102 |
-
1. ![The *Switch To* link on the Users screen](https://raw.github.com/johnbillion/user-switching/master/assets-wp-repo/screenshot-1.png)
|
103 |
-
2. ![The *Switch To* link on a user's profile](https://raw.github.com/johnbillion/user-switching/master/assets-wp-repo/screenshot-2.png)
|
104 |
-
|
105 |
== Upgrade Notice ==
|
106 |
|
107 |
-
= 0.8.
|
108 |
* Show admin notices on all possible admin screens.
|
109 |
* Tweak the redirect location for BuddyPress user profiles.
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
113 |
= 0.8.3 =
|
|
|
114 |
* Show admin notices on all possible admin screens.
|
115 |
* Tweak the redirect location for BuddyPress user profiles.
|
116 |
* Change the textdomain in the plugin to match the plugin slug (required for language packs in WordPress core).
|
117 |
-
* Switch to storing data in cookies as JSON instead of PHP-serialized.
|
118 |
|
119 |
= 0.8.2 =
|
120 |
* Russian translation by R J
|
@@ -199,4 +200,3 @@ When a user switches off, the `switch_off_user` hook is called with the old user
|
|
199 |
|
200 |
= 0.1 =
|
201 |
* Initial release.
|
202 |
-
|
4 |
Tags: user, users, profiles, switching, wpmu, multisite, buddypress, become, user control, user management, user access, developer
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.7
|
7 |
+
Stable tag: 0.8.4
|
8 |
License: GPL v2 or later
|
9 |
|
10 |
Instant switching between user accounts in WordPress.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
This plugin allows you to quickly swap between user accounts in WordPress at the click of a button. You'll be instantly logged out and logged in as your desired user. This is handy for test environments where you regularly log out and in between different accounts, or for adminstrators who need to switch between multiple accounts.
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
+
* Switch user: Instantly switch to any user account from the *Users* screen.
|
19 |
* Switch back: Instantly switch back to your originating account.
|
20 |
* Switch off: Log out of your account but retain the ability to instantly switch back in again.
|
21 |
* It's completely secure (see the *Security* section below).
|
23 |
|
24 |
= Security =
|
25 |
|
26 |
+
* Only users with the ability to edit other users can switch user accounts. By default this is only Administrators on single site installs, and Super Admins on Multisite installs.
|
27 |
* Passwords are not (and cannot be) revealed.
|
28 |
+
* Implements WordPress' nonce security system, meaning only those who intend to switch users can switch.
|
29 |
* Full support for administration over SSL (if applicable).
|
30 |
|
31 |
= Usage =
|
32 |
|
33 |
1. Visit the *Users* menu in WordPress and you'll see a *Switch To* link next to each user.
|
34 |
2. Click this and you will immediately switch into that user account.
|
35 |
+
3. You can switch back to your originating account via the *Switch back* link on each dashboard screen or in your profile menu in the WordPress toolbar.
|
36 |
|
37 |
See the [FAQ](http://wordpress.org/plugins/user-switching/faq/) for information about the *Switch Off* feature.
|
38 |
|
48 |
* Russian by R J
|
49 |
* Slovak by Max Samael
|
50 |
|
51 |
+
== Screenshots ==
|
52 |
+
|
53 |
+
1. ![The *Switch To* link on the Users screen](https://raw.github.com/johnbillion/user-switching/master/assets-wp-repo/screenshot-1.png)
|
54 |
+
2. ![The *Switch To* link on a user's profile](https://raw.github.com/johnbillion/user-switching/master/assets-wp-repo/screenshot-2.png)
|
55 |
+
|
56 |
== Installation ==
|
57 |
|
58 |
+
If you have the [WordPress Developer plugin](http://wordpress.org/plugins/developer/) installed then User Switching is a one-click install from the Tools -> Developer screen.
|
59 |
+
|
60 |
+
Alternatively, you can install this plugin directly from your WordPress dashboard:
|
61 |
|
62 |
1. Go to the *Plugins* menu and click *Add New*.
|
63 |
2. Search for *User Switching*.
|
64 |
+
3. Click *Install Now* next to the *User Switching* plugin.
|
65 |
4. Activate the plugin.
|
66 |
|
|
|
|
|
|
|
|
|
67 |
== Frequently Asked Questions ==
|
68 |
|
69 |
= What does "Switch off" mean? =
|
92 |
|
93 |
No. This can be enabled though by installing the [User Switching for Regular Admins](https://github.com/johnbillion/user-switching-for-regular-admins) plugin.
|
94 |
|
95 |
+
= Are any plugin hooks called when users switch accounts? =
|
96 |
|
97 |
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.
|
98 |
|
100 |
|
101 |
When a user switches off, the `switch_off_user` hook is called with the old user ID as a parameter.
|
102 |
|
|
|
|
|
|
|
|
|
|
|
103 |
== Upgrade Notice ==
|
104 |
|
105 |
+
= 0.8.4 =
|
106 |
* Show admin notices on all possible admin screens.
|
107 |
* Tweak the redirect location for BuddyPress user profiles.
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 0.8.4 =
|
112 |
+
* Revert a change in 0.8.3 which switched to using the `login_init` hook. This hook is fired too late.
|
113 |
+
|
114 |
= 0.8.3 =
|
115 |
+
* Switch to storing data in cookies as JSON instead of PHP-serialized.
|
116 |
* Show admin notices on all possible admin screens.
|
117 |
* Tweak the redirect location for BuddyPress user profiles.
|
118 |
* Change the textdomain in the plugin to match the plugin slug (required for language packs in WordPress core).
|
|
|
119 |
|
120 |
= 0.8.2 =
|
121 |
* Russian translation by R J
|
200 |
|
201 |
= 0.1 =
|
202 |
* Initial release.
|
|
user-switching.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: User Switching
|
4 |
Description: Instant switching between user accounts in WordPress
|
5 |
-
Version: 0.8.
|
6 |
Plugin URI: https://lud.icro.us/wordpress-plugin-user-switching/
|
7 |
Author: John Blackbourn
|
8 |
Author URI: https://johnblackbourn.com/
|
@@ -37,7 +37,6 @@ class user_switching {
|
|
37 |
add_filter( 'user_row_actions', array( $this, 'filter_user_row_actions' ), 10, 2 );
|
38 |
add_action( 'plugins_loaded', array( $this, 'action_plugins_loaded' ) );
|
39 |
add_action( 'init', array( $this, 'action_init' ) );
|
40 |
-
add_action( 'login_init', array( $this, 'action_login_init' ) );
|
41 |
add_action( 'all_admin_notices', array( $this, 'action_admin_notices' ), 1 );
|
42 |
add_action( 'wp_logout', 'wp_clear_olduser_cookie' );
|
43 |
add_action( 'wp_login', 'wp_clear_olduser_cookie' );
|
@@ -102,7 +101,7 @@ class user_switching {
|
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
-
* Load localisation files.
|
106 |
*
|
107 |
* @return null
|
108 |
*/
|
@@ -110,15 +109,6 @@ class user_switching {
|
|
110 |
|
111 |
load_plugin_textdomain( 'user-switching', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
112 |
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Route actions depending on the 'action' query var. Actions are secured with WordPress' nonce system.
|
117 |
-
*
|
118 |
-
* @return null
|
119 |
-
*/
|
120 |
-
public function action_login_init() {
|
121 |
-
|
122 |
if ( !isset( $_REQUEST['action'] ) )
|
123 |
return;
|
124 |
|
2 |
/*
|
3 |
Plugin Name: User Switching
|
4 |
Description: Instant switching between user accounts in WordPress
|
5 |
+
Version: 0.8.4
|
6 |
Plugin URI: https://lud.icro.us/wordpress-plugin-user-switching/
|
7 |
Author: John Blackbourn
|
8 |
Author URI: https://johnblackbourn.com/
|
37 |
add_filter( 'user_row_actions', array( $this, 'filter_user_row_actions' ), 10, 2 );
|
38 |
add_action( 'plugins_loaded', array( $this, 'action_plugins_loaded' ) );
|
39 |
add_action( 'init', array( $this, 'action_init' ) );
|
|
|
40 |
add_action( 'all_admin_notices', array( $this, 'action_admin_notices' ), 1 );
|
41 |
add_action( 'wp_logout', 'wp_clear_olduser_cookie' );
|
42 |
add_action( 'wp_login', 'wp_clear_olduser_cookie' );
|
101 |
}
|
102 |
|
103 |
/**
|
104 |
+
* Load localisation files and route actions depending on the 'action' query var.
|
105 |
*
|
106 |
* @return null
|
107 |
*/
|
109 |
|
110 |
load_plugin_textdomain( 'user-switching', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
if ( !isset( $_REQUEST['action'] ) )
|
113 |
return;
|
114 |
|