Skip to content
Browse files

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

… or email
  • Loading branch information...
1 parent 7c71190 commit 993c4fe32cc25a4d03a729bfc44112417a5e5e33 @samhemelryk samhemelryk committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/db/upgrade.php
View
3 lib/db/upgrade.php
@@ -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;
}

0 comments on commit 993c4fe

Please sign in to comment.
Something went wrong with that request. Please try again.