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

This commit is contained in:
Sam Hemelryk
2009-11-23 08:13:52 +00:00
parent 7c71190b05
commit 993c4fe32c
+2 -1
View File
@@ -806,8 +806,9 @@ function xmldb_main_upgrade($oldversion=0) {
AND rc.contextid = ".$systemcontext->id."";
$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;
}