MDL-9983, MDL-13998, MDL-15552 core events related cleanup and potential sql injection problem fixed; please note the changes are not backwards compatible, 3rd party code will need to be updated - sorry for the trouble
This commit is contained in:
+5
-3
@@ -181,14 +181,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
// reload from db
|
||||
$usernew = get_record('user', 'id', $user->id);
|
||||
events_trigger('user_updated', $usernew);
|
||||
|
||||
if ($USER->id == $user->id) {
|
||||
// Override old $USER session variable if needed
|
||||
$usernew = (array)get_record('user', 'id', $user->id); // reload from db
|
||||
foreach ($usernew as $variable => $value) {
|
||||
foreach ((array)$usernew as $variable => $value) {
|
||||
$USER->$variable = $value;
|
||||
}
|
||||
}
|
||||
events_trigger('user_updated', $usernew);
|
||||
|
||||
if (!$email_changed || !$CFG->emailchangeconfirmation) {
|
||||
redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id");
|
||||
|
||||
Reference in New Issue
Block a user