Commit 050e43ba authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1818901: User creation via SAML / XMLRPC not set passwordchange"

parents c70e4260 6fd8ebb5
......@@ -225,7 +225,7 @@ class AuthSaml extends Auth {
if ($create) {
$user->passwordchange = 1;
$user->passwordchange = 0;
$user->active = 1;
$user->deleted = 0;
......
......@@ -179,7 +179,7 @@ class AuthXmlrpc extends Auth {
if ($create) {
$user->passwordchange = 1;
$user->passwordchange = 0;
$user->active = 1;
$user->deleted = 0;
......
......@@ -1361,5 +1361,16 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2019062600) {
log_debug('Remove force password change for those using external auth');
execute_sql("UPDATE {usr} SET passwordchange = 0
WHERE id IN (
SELECT u.id FROM {usr} u
JOIN {auth_instance} ui ON ui.id = u.authinstance
WHERE ui.authname != 'internal' AND ui.active = 1
)
AND id != 0"); // Ignore the root user
}
return $status;
}
......@@ -16,7 +16,7 @@ $config = new stdClass();
// 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.
$config->version = 2019062000;
$config->version = 2019062600;
$config->series = '19.10';
$config->release = '19.10dev';
$config->minupgradefrom = 2017031605;
......
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