Skip to content

Commit

Permalink
compatibility hack for Moodle Cron, cookies not deleted, but set to "…
Browse files Browse the repository at this point in the history
…deleted"
  • Loading branch information
skodak committed Jul 6, 2005
1 parent 9182889 commit f497c75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f497c75

Please sign in to comment.