redirect_to overwritten
-
Hi,
When using login with ajax the redirect_to for the normal login form gets overwritten if you set any role based or other url at the login redirection settings.
In my opinion these settings should only define an alternative to the default redirect page (which normally is /wp-admin).
To fix this the ‘login_redirect’ filter needs to work with the second argument that is now ignored. I believe the following would fix it:public static function loginRedirect( $redirect, $requested_redirect_to, $user ){ $data = self::$data; if( is_object($user) && empty($requested_redirect_to) ){ $lwa_redirect = self::getLoginRedirect($user); if( $lwa_redirect != '' ){ $redirect = $lwa_redirect; } } return $redirect; }This way any requested redirect url has higher priority.
I hope you can incorporate this in a future update.
Regards,
Distinct
The topic ‘redirect_to overwritten’ is closed to new replies.