Commit 141de041 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1756726: Only run the password reset if no policy"

parents ace0bd72 453c088b
......@@ -5798,14 +5798,17 @@ function xmldb_core_upgrade($oldversion=0) {
}
if ($oldversion < 2018031900) {
log_debug('Force users to change their password to fix new password policy');
execute_sql("UPDATE {usr} SET passwordchange = 1
WHERE authinstance IN (
SELECT ai.id
FROM {auth_instance} ai
WHERE ai.authname = 'internal'
)
AND id != 0"); // Ignore the root user
if (!get_config('passwordpolicy')) {
log_debug('Force users to change their password to fix new password policy');
execute_sql("UPDATE {usr} SET passwordchange = 1
WHERE authinstance IN (
SELECT ai.id
FROM {auth_instance} ai
WHERE ai.authname = 'internal'
)
AND id != 0"); // Ignore the root user
set_config('passwordpolicy', '8_ulns');
}
}
return $status;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment