From: skodak <skodak>
Date: Sat, 19 Jan 2008 20:05:21 +0000 (+0000)
Subject: MDL-13063 fixed comments and changeme password reset; merged from MOODLE_19_STABLE
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ff396fd5973f5c6f524be24985a5c5cd27104428;p=moodle.git

MDL-13063 fixed comments and changeme password reset; merged from MOODLE_19_STABLE
---

diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index 0165e36464..0870c41d5f 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -3044,7 +3044,9 @@ function authenticate_user_login($username, $password) {
 function complete_user_login($user) {
     global $CFG, $USER;
     
-    $USER = $user; // should not be needed, but cover for legacy code
+    $USER = $user; // this is required because we need to access preferences here!
+
+    reload_user_preferences();
 
     update_user_login_times();
     if (empty($CFG->nolastloggedin)) {