Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to referrer URL #110

Closed
wgstjf opened this issue Oct 3, 2023 · 1 comment
Closed

Redirect to referrer URL #110

wgstjf opened this issue Oct 3, 2023 · 1 comment

Comments

@wgstjf
Copy link

wgstjf commented Oct 3, 2023

Hi,

Hopefully a quick one. We'd like the User to be returned to the refererer URL where they clicked on the 'Switch To' link when the switch back. Is there a filter we can use to define/override the redirect url? Hoping to affect all instances of the 'Swtich To' link wherever it appears, ie. table, user edit screen or custom instances using maybe_switch_url.

Thanks in advance,

Will

@johnbillion
Copy link
Owner

Yes you can use the login_redirect filter for this, which also takes effect when a user manually logs in to WordPress.

Ref: https://wordpress.org/plugins/user-switching/#are%20any%20plugin%20actions%20called%20when%20a%20user%20switches%20account%3F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants