MDL-54755 core: Incorrect redirection after password change

This commit is contained in:
Gilles-Philippe Leblanc
2016-06-27 08:21:31 -04:00
parent eb36cfcbb6
commit 97b0761cdf
3 changed files with 119 additions and 1 deletions
+2 -1
View File
@@ -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 {