Version Description
Download this release
Release Info
Developer | johnbillion |
Plugin | User Switching |
Version | 1.5.8 |
Comparing to | |
See all releases |
Code changes from version 1.5.7 to 1.5.8
- phpstan.neon.dist +0 -17
- readme.md +63 -45
- user-switching.php +3 -3
phpstan.neon.dist
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
includes:
|
2 |
-
- vendor/szepeviktor/phpstan-wordpress/extension.neon
|
3 |
-
parameters:
|
4 |
-
level: max
|
5 |
-
implicitThrows: false
|
6 |
-
paths:
|
7 |
-
- user-switching.php
|
8 |
-
bootstrapFiles:
|
9 |
-
- tests/stubs.php
|
10 |
-
ignoreErrors:
|
11 |
-
# Uses func_get_args()
|
12 |
-
- '#^Function apply_filters invoked with [34567] parameters, 2 required\.$#'
|
13 |
-
# Covers the breaks after exits in user_switching::action_init()
|
14 |
-
-
|
15 |
-
message: '#^Unreachable statement#'
|
16 |
-
path: user-switching.php
|
17 |
-
count: 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
# User Switching
|
2 |
|
3 |
-
Stable tag: 1.5.
|
4 |
Requires at least: 3.7
|
5 |
-
Tested up to:
|
6 |
Requires PHP: 5.3
|
7 |
License: GPL v2 or later
|
8 |
Tags: users, profiles, user switching, fast user switching, multisite, buddypress, bbpress, become, user management, developer
|
@@ -85,6 +85,10 @@ User Switching is considered **Ethical Open Source** because it meets all of the
|
|
85 |
|
86 |
## Frequently Asked Questions
|
87 |
|
|
|
|
|
|
|
|
|
88 |
### What does "Switch off" mean?
|
89 |
|
90 |
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.
|
@@ -256,6 +260,10 @@ In addition, User Switching respects the following filters from WordPress core w
|
|
256 |
|
257 |
## Changelog ##
|
258 |
|
|
|
|
|
|
|
|
|
259 |
### 1.5.7 ###
|
260 |
|
261 |
* Fix some issues that could lead to PHP errors given a malformed cookie.
|
@@ -340,87 +348,97 @@ In addition, User Switching respects the following filters from WordPress core w
|
|
340 |
* Docblock improvements.
|
341 |
* Coding standards improvements.
|
342 |
|
343 |
-
### 0.
|
344 |
-
|
345 |
-
- More intuitive redirecting after switching.
|
346 |
-
- Avoid a BuddyPress bug preventing Switch To buttons from appearing.
|
347 |
-
- Added a template function: `current_user_switched()` which lets you know if the current user switched into their account.
|
348 |
-
- Added some hooks: `switch_to_user`, `switch_back_user` and `switch_off_user`, fired when appropriate.
|
349 |
-
|
350 |
-
|
351 |
-
### 0.5.2 ###
|
352 |
|
353 |
-
-
|
354 |
-
- Display switch back links in Network Admin and login screen.
|
355 |
-
- Avoid a BuddyPress bug preventing Switch To buttons from appearing.
|
356 |
|
357 |
|
358 |
-
### 0.
|
359 |
|
360 |
-
-
|
|
|
|
|
|
|
361 |
|
362 |
|
363 |
-
### 0.
|
364 |
|
365 |
-
-
|
|
|
|
|
|
|
|
|
366 |
|
367 |
|
368 |
-
### 0.
|
369 |
|
370 |
-
-
|
|
|
371 |
|
372 |
|
373 |
-
### 0.5 ###
|
374 |
|
375 |
-
-
|
|
|
376 |
|
377 |
|
378 |
-
### 0.4
|
379 |
|
380 |
-
- Support for
|
381 |
|
382 |
|
383 |
-
### 0.
|
384 |
|
385 |
-
-
|
386 |
-
-
|
387 |
-
- Fix a permissions problem for users with no privileges.
|
388 |
-
- Fix a PHP warning when used as a mu-plugin (thanks Scribu).
|
389 |
|
390 |
|
391 |
-
### 0.
|
392 |
|
393 |
-
-
|
394 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
|
396 |
|
397 |
-
### 0.
|
398 |
|
399 |
-
-
|
|
|
400 |
|
401 |
|
402 |
-
### 0
|
403 |
|
404 |
-
-
|
|
|
|
|
405 |
|
406 |
|
407 |
-
### 0.
|
408 |
|
409 |
-
-
|
410 |
-
-
|
411 |
|
412 |
|
413 |
-
### 0.
|
414 |
|
415 |
-
-
|
|
|
|
|
|
|
416 |
|
417 |
|
418 |
-
### 0.
|
419 |
|
420 |
-
-
|
|
|
421 |
|
422 |
|
423 |
-
### 0.
|
424 |
|
425 |
-
-
|
426 |
|
1 |
# User Switching
|
2 |
|
3 |
+
Stable tag: 1.5.8
|
4 |
Requires at least: 3.7
|
5 |
+
Tested up to: 6.0
|
6 |
Requires PHP: 5.3
|
7 |
License: GPL v2 or later
|
8 |
Tags: users, profiles, user switching, fast user switching, multisite, buddypress, bbpress, become, user management, developer
|
85 |
|
86 |
## Frequently Asked Questions
|
87 |
|
88 |
+
### Does this plugin work with PHP 8?
|
89 |
+
|
90 |
+
Yes.
|
91 |
+
|
92 |
### What does "Switch off" mean?
|
93 |
|
94 |
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.
|
260 |
|
261 |
## Changelog ##
|
262 |
|
263 |
+
### 1.5.8 ###
|
264 |
+
|
265 |
+
* Avoid a fatal if the `interim-login` query parameter is present on a page other than wp-login.php.
|
266 |
+
|
267 |
### 1.5.7 ###
|
268 |
|
269 |
* Fix some issues that could lead to PHP errors given a malformed cookie.
|
348 |
* Docblock improvements.
|
349 |
* Coding standards improvements.
|
350 |
|
351 |
+
### 1.0.9 ###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
|
353 |
+
- Remove the bundled languages in favour of language packs from translate.wordpress.org.
|
|
|
|
|
354 |
|
355 |
|
356 |
+
### 1.0.8 ###
|
357 |
|
358 |
+
- Chinese (Taiwan) and Czech translations.
|
359 |
+
- Updated Dutch, Spanish, Hebrew, and German translations.
|
360 |
+
- Add an ID attribute to the links that User Switching outputs on the WordPress login screen, BuddyPress screens, and bbPress screens.
|
361 |
+
- Avoid a deprecated argument notice when the `user-actions` admin toolbar node has been removed.
|
362 |
|
363 |
|
364 |
+
### 1.0.7 ###
|
365 |
|
366 |
+
- Azerbaijani, Danish, and Bosnian translations.
|
367 |
+
- Add back the 'User Switching' heading on the user profile screen.
|
368 |
+
- Correct the value passed to the `$old_user_id` parameter of the `switch_back_user` hook when a user has been switched off. This should be boolean `false` rather than `0`.
|
369 |
+
- Docblocks for actions and filters.
|
370 |
+
- More code standards tweaks.
|
371 |
|
372 |
|
373 |
+
### 1.0.6 ###
|
374 |
|
375 |
+
- Correct the values passed to the `switch_back_user` action when a user switches back.
|
376 |
+
- More code standards tweaks.
|
377 |
|
378 |
|
379 |
+
### 1.0.5 ###
|
380 |
|
381 |
+
- Norwegian translation by Per Søderlind.
|
382 |
+
- Code standards tweaks.
|
383 |
|
384 |
|
385 |
+
### 1.0.4 ###
|
386 |
|
387 |
+
- Support for the new `logout_redirect` and `removable_query_args` filters in WordPress 4.2.
|
388 |
|
389 |
|
390 |
+
### 1.0.3 ###
|
391 |
|
392 |
+
- Croation translation by Ante Sepic.
|
393 |
+
- Avoid PHP notices caused by other plugins which erroneously use boolean `true` as a capability.
|
|
|
|
|
394 |
|
395 |
|
396 |
+
### 1.0.2 ###
|
397 |
|
398 |
+
- Turkish translation by Abdullah Pazarbasi.
|
399 |
+
- Romanian translation by ArianServ.
|
400 |
+
- Dutch translation by Thom.
|
401 |
+
- Greek translation by evigiannakou.
|
402 |
+
- Bulgarian translation by Petya Raykovska.
|
403 |
+
- Finnish translation by Sami Keijonen.
|
404 |
+
- Italian translation by Alessandro Curci and Alessandro Tesoro.
|
405 |
+
- Updated Arabic, Spanish, German, and Polish translations.
|
406 |
|
407 |
|
408 |
+
### 1.0.1 ###
|
409 |
|
410 |
+
- Shorten the names of User Switching's cookies to avoid problems with Suhosin's over-zealous default rules.
|
411 |
+
- Add backwards compatibility for the deprecated `OLDUSER_COOKIE` constant.
|
412 |
|
413 |
|
414 |
+
### 1.0 ###
|
415 |
|
416 |
+
- Security hardening for sites that use HTTPS in the admin area and HTTP on the front end.
|
417 |
+
- Add an extra auth check before the nonce verification.
|
418 |
+
- Pretty icon next to the switch back links.
|
419 |
|
420 |
|
421 |
+
### 0.9 ###
|
422 |
|
423 |
+
- Minor fixes for the `login_redirect` filter.
|
424 |
+
- Increase the specificity of the `switch_to_old_user` and `switch_off` nonces.
|
425 |
|
426 |
|
427 |
+
### 0.8.9 ###
|
428 |
|
429 |
+
- French translation by Fx Bénard.
|
430 |
+
- Hebrew translation by Rami Y.
|
431 |
+
- Indonesian translation by Eko Ikhyar.
|
432 |
+
- Portuguese translation by Raphael Mendonça.
|
433 |
|
434 |
|
435 |
+
### 0.8.8 ###
|
436 |
|
437 |
+
- Spanish Translation by Marcelo Pedra.
|
438 |
+
- User Switching is now a network-only plugin when used on Multisite.
|
439 |
|
440 |
|
441 |
+
### 0.8.7 ###
|
442 |
|
443 |
+
- Respect the `secure_logged_in_cookie` and `login_redirect` filters.
|
444 |
|
user-switching.php
CHANGED
@@ -10,8 +10,8 @@
|
|
10 |
*
|
11 |
* Plugin Name: User Switching
|
12 |
* Description: Instant switching between user accounts in WordPress
|
13 |
-
* Version: 1.5.
|
14 |
-
* Plugin URI: https://
|
15 |
* Author: John Blackbourn & contributors
|
16 |
* Author URI: https://github.com/johnbillion/user-switching/graphs/contributors
|
17 |
* Text Domain: user-switching
|
@@ -211,7 +211,7 @@ class user_switching {
|
|
211 |
// Switch user:
|
212 |
if ( switch_to_user( $old_user->ID, self::remember(), false ) ) {
|
213 |
|
214 |
-
if ( ! empty( $_REQUEST['interim-login'] ) ) {
|
215 |
$GLOBALS['interim_login'] = 'success'; // @codingStandardsIgnoreLine
|
216 |
login_header( '', '' );
|
217 |
exit;
|
10 |
*
|
11 |
* Plugin Name: User Switching
|
12 |
* Description: Instant switching between user accounts in WordPress
|
13 |
+
* Version: 1.5.8
|
14 |
+
* Plugin URI: https://wordpress.org/plugins/user-switching/
|
15 |
* Author: John Blackbourn & contributors
|
16 |
* Author URI: https://github.com/johnbillion/user-switching/graphs/contributors
|
17 |
* Text Domain: user-switching
|
211 |
// Switch user:
|
212 |
if ( switch_to_user( $old_user->ID, self::remember(), false ) ) {
|
213 |
|
214 |
+
if ( ! empty( $_REQUEST['interim-login'] ) && function_exists( 'login_header' ) ) {
|
215 |
$GLOBALS['interim_login'] = 'success'; // @codingStandardsIgnoreLine
|
216 |
login_header( '', '' );
|
217 |
exit;
|