Commit dfab8527 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1790742: stop deleting user sessions when updating user data"

parents b125a378 59e381ef
......@@ -557,6 +557,10 @@ function uploadcsv_submit(Pieform $form, $values) {
unset($UPDATES[$user->username]);
}
else {
// Log the user out, otherwise they can overwrite all this on the next request
if (!empty($user->id)) {
remove_user_sessions($user->id);
}
$UPDATES[$user->username] = $updated;
log_debug('updated user ' . $user->username . ' (' . implode(', ', array_keys($updated)) . ')');
}
......
......@@ -2575,9 +2575,6 @@ function update_user($user, $profile, $remotename=null, $accountprefs=array(), $
db_begin();
// Log the user out, otherwise they can overwrite all this on the next request
remove_user_sessions($userid);
$updated = array();
$newrecord = new stdClass();
foreach (get_object_vars($user) as $k => $v) {
......
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