From 7123e12e0316e723e69baa502252e8ef57440097 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 6 Jan 2005 12:56:05 +0000 Subject: [PATCH] Unset password change AFTER creating the new $USER variable, otherwise you get asked to change it twice. --- login/change_password.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/login/change_password.php b/login/change_password.php index 879c79cf81..a8e2f5fe6f 100644 --- a/login/change_password.php +++ b/login/change_password.php @@ -54,13 +54,13 @@ } } - // register success changing password - unset_user_preference('auth_forcepasswordchange'); - $USER = $user; $USER->loggedin = true; $USER->site = $CFG->wwwroot; // for added security + // register success changing password + unset_user_preference('auth_forcepasswordchange'); + set_moodle_cookie($USER->username); reset_login_count(); -- 2.39.5