Merge branch 'w27_MDL-28158_m22_cookies' of git://github.com/skodak/moodle
This commit is contained in:
@@ -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])) {
|
||||
|
||||
Reference in New Issue
Block a user