mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merged session fixes from stable
This commit is contained in:
parent
a5c2c68cc0
commit
b384fbda90
@ -222,9 +222,18 @@
|
||||
}
|
||||
if (isset($USER->newadminuser)) {
|
||||
unset($USER->newadminuser);
|
||||
redirect("$CFG->wwwroot/", get_string("changessaved"));
|
||||
redirect("$CFG->wwwroot/", get_string('changessaved'));
|
||||
}
|
||||
if (!empty($SESSION->wantsurl)) { // User may have been forced to edit account, so let's
|
||||
// send them to where they wanted to go originally
|
||||
$wantsurl = $SESSION->wantsurl;
|
||||
$SESSION->wantsurl = ''; // In case unset doesn't work as expected
|
||||
unset($SESSION->wantsurl);
|
||||
redirect($wantsurl, get_string('changessaved'));
|
||||
} else {
|
||||
redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id",
|
||||
get_string("changessaved"));
|
||||
}
|
||||
redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", get_string("changessaved"));
|
||||
} else {
|
||||
redirect("$CFG->wwwroot/$CFG->admin/user.php", get_string("changessaved"));
|
||||
}
|
||||
|
@ -9,11 +9,6 @@
|
||||
$enable = optional_param('enable', ''); // enable email
|
||||
$disable = optional_param('disable', ''); // disable email
|
||||
|
||||
if (!empty($SESSION->wantsurl)) {
|
||||
$wantsurl = $SESSION->wantsurl;
|
||||
unset($SESSION->wantsurl);
|
||||
redirect($wantsurl);
|
||||
}
|
||||
|
||||
if (empty($id)) { // See your own profile by default
|
||||
require_login();
|
||||
|
Loading…
x
Reference in New Issue
Block a user