I'm facing an issue with WP installed in its own custom directory (e.g. /wp) and the User Switching plugin.
When switching to another user (e.g from admin to editor) and trying to switch back, I get the error:
Could not switch users.
Steps to reproduce:
Install WP in custom directory (e.g. /wp)
Install & activate User Switching plugin
Install & activate WPS Hide Login plugin
Add editor user
Click 'Switch to' link below editor username
Click 'Switch back to admin' link in admin notice or user menu.
By deactivating WPS Hide Login it works as expected.
The switch action posted to wp-login.php is switch_to_olduser.
The URL without WPS Hide Login is:
https://test.dev/wp/wp-login.php?action=switch_to_olduser&nr=1&_wpnonce=xxx&redirect_to=https%3A%2F%2Ftest.dev%wp%2Fwp-admin%2F%3Fuser_switched%3Dtrue
with WPS Hide Login activated:
https://test.dev/login/?action=switch_to_olduser&nr=1&_wpnonce=xxx&redirect_to=https%3A%2F%2Ftest.dev%wp%2Fwp-admin%2F%3Fuser_switched%3Dtrue
Note: with WP installed in the root it works as expected.
Hi,
I'm facing an issue with WP installed in its own custom directory (e.g. /wp) and the User Switching plugin.
When switching to another user (e.g from admin to editor) and trying to switch back, I get the error:
Steps to reproduce:
By deactivating WPS Hide Login it works as expected.
The switch action posted to wp-login.php is
switch_to_olduser
.The URL without WPS Hide Login is:
https://test.dev/wp/wp-login.php?action=switch_to_olduser&nr=1&_wpnonce=xxx&redirect_to=https%3A%2F%2Ftest.dev%wp%2Fwp-admin%2F%3Fuser_switched%3Dtrue
with WPS Hide Login activated:
https://test.dev/login/?action=switch_to_olduser&nr=1&_wpnonce=xxx&redirect_to=https%3A%2F%2Ftest.dev%wp%2Fwp-admin%2F%3Fuser_switched%3Dtrue
Note: with WP installed in the root it works as expected.
Thanks