mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-54921-master' of https://github.com/xow/moodle
This commit is contained in:
commit
8e9cb9b1dd
@ -44,8 +44,16 @@ $PAGE->https_required();
|
|||||||
$PAGE->set_url('/login/signup.php');
|
$PAGE->set_url('/login/signup.php');
|
||||||
$PAGE->set_context(context_system::instance());
|
$PAGE->set_context(context_system::instance());
|
||||||
|
|
||||||
// Override wanted URL, we do not want to end up here again if user clicks "Login".
|
// If wantsurl is empty or /login/signup.php, override wanted URL.
|
||||||
$SESSION->wantsurl = $CFG->wwwroot . '/';
|
// We do not want to end up here again if user clicks "Login".
|
||||||
|
if (empty($SESSION->wantsurl)) {
|
||||||
|
$SESSION->wantsurl = $CFG->wwwroot . '/';
|
||||||
|
} else {
|
||||||
|
$wantsurl = new moodle_url($SESSION->wantsurl);
|
||||||
|
if ($PAGE->url->compare($wantsurl, URL_MATCH_BASE)) {
|
||||||
|
$SESSION->wantsurl = $CFG->wwwroot . '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isloggedin() and !isguestuser()) {
|
if (isloggedin() and !isguestuser()) {
|
||||||
// Prevent signing up when already logged in.
|
// Prevent signing up when already logged in.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user