wp-user-manager icon indicating copy to clipboard operation
wp-user-manager copied to clipboard

User switching plugin not working when switching back

Open polevaultweb opened this issue 6 years ago • 2 comments

Could not switch users.

When the setting to disable wp-login.php is on

polevaultweb avatar Oct 03 '19 21:10 polevaultweb

https://github.com/johnbillion/user-switching/issues/14

add_action('wp_die_handler', function($handler) {
	parse_str($_SERVER['QUERY_STRING'], $query);

	if ( $query['action'] === 'switch_to_olduser' ) {
		wp_redirect(get_bloginfo('wpurl') . $_SERVER['REQUEST_URI']);
		exit;
	}

	return $handler;
});

polevaultweb avatar Sep 07 '20 15:09 polevaultweb

Did you manage to recreate @reygcalantaol?

polevaultweb avatar Aug 07 '22 09:08 polevaultweb