MDL-22739 keeping the magic 'changeme' password only for manual auth, it does not...
authorPetr Skoda <skodak@moodle.org>
Sun, 10 Oct 2010 21:48:12 +0000 (21:48 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 10 Oct 2010 21:48:12 +0000 (21:48 +0000)
login/index.php

index 6327ad5..b106bfc 100644 (file)
@@ -172,8 +172,9 @@ if ($frm and isset($frm->username)) {                             // Login WITH
             die;
         }
 
-        if ($frm->password == 'changeme') {
-            //force the change
+        if ($user->auth === 'manual' and $frm->password === 'changeme') {
+            // force the change - this is deprecated and it makes sense only for manual auth,
+            // because most other plugins can not change password easily
             set_user_preference('auth_forcepasswordchange', true, $user->id);
         }