Commit c7259178 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1756726: Apply password policy on upgrade



Force all users on internal auth to reset their password on login
after upgrade

behatnotneeded

Change-Id: Ia988a0a7b939969bf0638eb410d17e1c88282c31
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent a5fd0d20
...@@ -5797,5 +5797,16 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -5797,5 +5797,16 @@ 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
}
return $status; return $status;
} }
...@@ -16,7 +16,7 @@ $config = new stdClass(); ...@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy // See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date. // For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2018030800; $config->version = 2018031900;
$config->series = '18.10'; $config->series = '18.10';
$config->release = '18.10dev'; $config->release = '18.10dev';
$config->minupgradefrom = 2015030409; $config->minupgradefrom = 2015030409;
......
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