MDL-54755 core: Incorrect redirection after password change
This commit is contained in:
+2
-1
@@ -4296,7 +4296,7 @@ function authenticate_user_login($username, $password, $ignorelockout=false, &$f
|
||||
* @return stdClass A {@link $USER} object - BC only, do not use
|
||||
*/
|
||||
function complete_user_login($user) {
|
||||
global $CFG, $USER;
|
||||
global $CFG, $USER, $SESSION;
|
||||
|
||||
\core\session\manager::login_user($user);
|
||||
|
||||
@@ -4339,6 +4339,7 @@ function complete_user_login($user) {
|
||||
if ($changeurl = $userauth->change_password_url()) {
|
||||
redirect($changeurl);
|
||||
} else {
|
||||
$SESSION->wantsurl = core_login_get_return_url();
|
||||
redirect($CFG->httpswwwroot.'/login/change_password.php');
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user