Misc changes to improve performance on a brand-new installation
This commit is contained in:
@@ -149,6 +149,11 @@
|
||||
$usernew->timemodified = time();
|
||||
|
||||
if (update_record("user", $usernew)) {
|
||||
if ($usernew->id == $USER->id) { // Reload admin
|
||||
$USER = get_user_info_from_db("id", $usernew->id);
|
||||
$USER->loggedin = true;
|
||||
set_moodle_cookie($USER->username);
|
||||
}
|
||||
redirect("index.php", "Changes saved");
|
||||
} else {
|
||||
error("Could not update the user record ($user->id)");
|
||||
|
||||
Reference in New Issue
Block a user