Cookies are not used with guests

This commit is contained in:
moodler
2005-05-07 03:10:48 +00:00
parent b27f46f2b3
commit 7cbe6afeaa
+6 -1
View File
@@ -2016,6 +2016,10 @@ function fullname($user, $override=false) {
function set_moodle_cookie($thing) {
global $CFG;
if ($thing == 'guest') { // Ignore guest account
return;
}
$cookiename = 'MOODLEID_'.$CFG->sessioncookie;
$days = 60;
@@ -2039,7 +2043,8 @@ function get_moodle_cookie() {
if (empty($_COOKIE[$cookiename])) {
return '';
} else {
return rc4decrypt($_COOKIE[$cookiename]);
$thing = rc4decrypt($_COOKIE[$cookiename]);
return ($thing == 'guest') ? '': $thing; // Ignore guest account
}
}