Permalink
Browse files

compatibility hack for Moodle Cron, cookies not deleted, but set to "…

…deleted"
  • Loading branch information...
1 parent 9182889 commit f497c755aa5bc65361db3441338e0e8d21a31f0c skodak committed Jul 6, 2005
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/setup.php
View
@@ -274,6 +274,14 @@ class object {};
unset($_GET['MoodleSession'.$CFG->sessioncookie]);
unset($_POST['MoodleSession'.$CFG->sessioncookie]);
+ //compatibility hack for Moodle Cron, cookies not deleted, but set to "deleted"
+ if (!empty($_COOKIE['MoodleSession'.$CFG->sessioncookie]) && $_COOKIE['MoodleSession'.$CFG->sessioncookie] == "deleted") {
+ unset($_COOKIE['MoodleSession'.$CFG->sessioncookie]);
+ }
+ if (!empty($_COOKIE['MoodleSessionTest'.$CFG->sessioncookie]) && $_COOKIE['MoodleSessionTest'.$CFG->sessioncookie] == "deleted") {
+ unset($_COOKIE['MoodleSessionTest'.$CFG->sessioncookie]);
+ }
+
if (!isset($nomoodlecookie)) {
session_name('MoodleSession'.$CFG->sessioncookie);
@session_start();

0 comments on commit f497c75

Please sign in to comment.