Permalink
Browse files

upgrade MDL-20937 Only force admins to change password if auth=manual…

… or email
  • Loading branch information...
1 parent 9bf18cc commit 17ba97e5be4c9907c41469b343928dae58eb75c1 Sam Hemelryk committed Nov 23, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/db/upgrade.php
View
3 lib/db/upgrade.php
@@ -3280,8 +3280,9 @@ function xmldb_main_upgrade($oldversion=0) {
AND rc.contextid = ".SYSCONTEXTID."";
$adminusers = get_records_sql($sql);
+ $permittedstates = array('email', 'manual');
foreach ($adminusers as $adminuser) {
- if ($adminuser->password === 'not cached') {
+ if ($adminuser->password === 'not cached' || !in_array($adminuser->auth, $permittedstates)) {
// no need to change password if stored only outside of moodle - most probably ldap auth
continue;
}

0 comments on commit 17ba97e

Please sign in to comment.