mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Finally the *correct* fix for the looping problem. Thanks to Penny (Merged from MOODLE_15_STABLE)
This commit is contained in:
parent
9d866ae0f1
commit
dd875f1aa2
@ -6528,7 +6528,7 @@ function remove_dir($dir, $content_only=false) {
|
||||
}
|
||||
|
||||
function report_session_error() {
|
||||
global $CFG, $FULLME, $SESSOIN;
|
||||
global $CFG, $FULLME;
|
||||
if (empty($CFG->lang)) {
|
||||
$CFG->lang = "en";
|
||||
}
|
||||
@ -6542,9 +6542,6 @@ function report_session_error() {
|
||||
} else {
|
||||
set_config('session_error_counter', 1);
|
||||
}
|
||||
unset($_SESSION['USER']);
|
||||
unset($GLOBALS['USER']);
|
||||
unset($SESSION->session_test);
|
||||
redirect($FULLME, get_string('sessionerroruser', 'error'), 2);
|
||||
}
|
||||
|
||||
|
@ -314,6 +314,11 @@ $CFG->httpswwwroot = $CFG->wwwroot;
|
||||
} else {
|
||||
$_COOKIE['MoodleSessionTest'.$CFG->sessioncookie] = 'error!!';
|
||||
}
|
||||
} else {
|
||||
if (empty($_COOKIE['MoodleSessionTest'.$CFG->sessioncookie])) {
|
||||
setcookie('MoodleSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, '/');
|
||||
$_COOKIE['MoodleSessionTest'.$CFG->sessioncookie] = $_SESSION['SESSION']->session_test;
|
||||
}
|
||||
}
|
||||
if (! isset($_SESSION['USER'])) {
|
||||
$_SESSION['USER'] = new object;
|
||||
|
Loading…
x
Reference in New Issue
Block a user