Active
Project:
No Anonymous Sessions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2009 at 19:28 UTC
Updated:
19 Jul 2011 at 17:13 UTC
I don't know if it's of any help to anybody, but when a users logs out, the cookie with the session is kept, so that prevents Varnish, for instance, to cache the pages.
Solution:
Replace inside session_read, this:
// We didn't find the client's record (session has expired), or they are an anonymous user.
else {
$session = isset($user->session) ? $user->session : '';
$user = drupal_anonymous_user($session);
}
with
else {
ini_set('session.use_cookies', 0);
$user = drupal_anonymous_user();
$cookie_params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000, '/', $cookie_params['domain']);
return '';
}
Comments
Comment #1
wim leersSubscribing.
Comment #2
Renee S commentedSubscribing.