From 8980a4e8db514eafaf17267017b3a39165b2b3c7 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 3 May 2003 11:45:41 +0000 Subject: [PATCH] Trying to unregister sessions properly and hopefully avoid the "compat" warnings on some setups --- login/logout.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); ?> -- 2.39.5