Session storing issue

vikramy - January 11, 2009 - 05:37
Project:Persistent Login
Version:6.x-1.4-beta4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:by design
Description

Hi,

Thanks for this wonderful module.

Well, I need to clarify a small thing. Sessions may not be saved properly(may be I am wrong in judging.)

I tested this like this.

I have magic tabs installed. So I just created three tabs and published in front page.

Case: When Remember Me was not enabled. (session.cookie_lifetime = 200000)
I clicked on third tab and closed browser. When I reopened again , Third tab was highlighted.

Case : When Remember Me was ENABLED (session.cookie_lifetime = 0)
I clicked on third tab and closed browser. When I reopened again ,first tab will be highlighted.

I think Session may not be handled properly . Correct me if I am wrong.

But everything else works properly. It asks for password on selected pages and much more.

#1

markus_petrux - April 23, 2009 - 01:31
Status:active» by design

This is a side effect of the algorithm implemented by PL. session.cookie_lifetime = 0 means the session cookie will be destroyed when the browser is closed. PL stores a separate cookie that has a higher expiration time that has enough information to validate and perfom autologin next time the user visits the site. When than happens, if the cookie and security checks are ok, PL asks drupal to create a new session, and that session will be completely new. Anything stored for the previous session will be lost unless this is explicitly prevented by the module that stores session data. PL invokes user_external_login() which invokes hook_user('login') and regenerates the session. That's all PL can do, I'm afraid.

 
 

Drupal is a registered trademark of Dries Buytaert.