From: moodler Date: Sat, 3 May 2003 11:45:41 +0000 (+0000) Subject: Trying to unregister sessions properly and hopefully avoid the "compat" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8980a4e8db514eafaf17267017b3a39165b2b3c7;p=moodle.git Trying to unregister sessions properly and hopefully avoid the "compat" warnings on some setups --- diff --git a/login/logout.php b/login/logout.php index b9fad41dd6..a511e62706 100644 --- a/login/logout.php +++ b/login/logout.php @@ -3,8 +3,14 @@ require_once("../config.php"); - $USER = NULL; - $SESSION = NULL; + if (ini_get("register_globals")) { + // This method is to try to avoid silly warnings from PHP 4.3.0 + session_unregister("SESSION"); + session_unregister("USER"); + } else { + unset($_SESSION['USER']); + unset($_SESSION['SESSION']); + } redirect($CFG->wwwroot); ?>