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:
skodak
2008-07-06 17:55:54 +00:00
parent 5d1bd2051d
commit 2959f8b18e
16 changed files with 200 additions and 73 deletions
+5 -3
View File
@@ -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");