Merge branch 'w27_MDL-28158_m22_cookies' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2011-07-11 15:33:03 +02:00
9 changed files with 44 additions and 19 deletions
+9
View File
@@ -811,6 +811,11 @@ function set_moodle_cookie($username) {
return;
}
if (empty($CFG->rememberusername)) {
// erase current and do not store permanent cookies
$username = '';
}
if ($username === 'guest') {
// keep previous cookie in case of guest account login
return;
@@ -839,6 +844,10 @@ function get_moodle_cookie() {
return '';
}
if (empty($CFG->rememberusername)) {
return '';
}
$cookiename = 'MOODLEID_'.$CFG->sessioncookie;
if (empty($_COOKIE[$cookiename])) {