Redirect Hook
-
Hi again,
sry to bother you again. I still have a challenge to redirect a user not to the default site (homepage) but to the path which was given with the uri.
I tried your hooks but they do what they have to do ( damn ?? ).
I think it is a good idea to have also a hook which could be called before the redirect from database is called.So you have the possibility request the following url:
https://mysite.com/calender/events/?rest_route=/jwt/v1/autologin&jwt=JWT
With the hook you can do something like this:
add_action( 'simple_jwt_login_redirect_hook', function(WP_User $user) { $requestUrl = $_SERVER['REQUEST_URI']; $redirectUrl = get_site_url() . strtok($requestUrl, '?'); wp_redirect($redirectUrl); } );
Is it possible to add this option?!
Thanks a lot.
Kurt
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Redirect Hook’ is closed to new replies.