Commit 1463b86d authored by Robert Lyon's avatar Robert Lyon

Bug 1471103: Force user to login after password reset via CLI script

Kill any sessions that the account may have active

behatnotneeded

Change-Id: I602fe94262c453eae1f5e1faf83d7709720bd906
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 82247213)
parent 08a3d700
......@@ -101,6 +101,8 @@ else {
$success = reset_password($user);
if ($success) {
// Delete the existing usr_session rows to force usr to log back in
execute_sql("DELETE FROM {usr_session} WHERE usr = ?", array($user->id));
$exitstring = get_string('cli_pwreset_success', 'admin', $username);
if ($forcepasswordchange) {
set_field('usr', 'passwordchange', 1, 'username', $username);
......
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