mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
Hopefully this will fix the logout problems - it now specifically
checks for PHP 4.3.0 or later, and also does the unset anyway. Sessions are not consistent in PHP versions.
This commit is contained in:
parent
958facf055
commit
eab79dc13d
1 changed files with 7 additions and 6 deletions
|
@ -3,14 +3,15 @@
|
|||
|
||||
require_once("../config.php");
|
||||
|
||||
if (ini_get_bool("register_globals")) {
|
||||
// This method is to try to avoid silly warnings from PHP 4.3.0
|
||||
session_unregister("SESSION");
|
||||
if (ini_get_bool("register_globals") and check_php_version("4.3.0")) {
|
||||
// This method is just to try to avoid silly warnings from PHP 4.3.0
|
||||
session_unregister("USER");
|
||||
} else {
|
||||
session_unregister("SESSION");
|
||||
}
|
||||
|
||||
unset($_SESSION['USER']);
|
||||
unset($_SESSION['SESSION']);
|
||||
}
|
||||
|
||||
redirect($CFG->wwwroot);
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue