Trying to unregister sessions properly and hopefully avoid the "compat"

warnings on some setups
This commit is contained in:
moodler
2003-05-03 11:45:41 +00:00
parent 24a39b1761
commit 8980a4e8db
+8 -2
View File
@@ -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);
?>