Yii Framework Forum: Persistent User Session even after logout/ browser restart stored into database - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Persistent User Session even after logout/ browser restart stored into database Rate Topic: -----

#1 User is offline   horizons 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 122
  • Joined: 18-December 08

Posted 17 July 2009 - 07:54 AM

Hi,

Is there a simple way to create a peristent per user stored session?
I want to stores several values into the database which should be not deleted after logout and are connected to a user.

The stored settings per user should be loaded each time the user logs in.
Currently I storing the information in the normal CDbHttpSession but they are deleted.
I also tried the Yii::app()->user->logout($destroySession=false); functionality which comes with yii v1.7.
which only deletes the values set via setState.

but somehow the session data isn't accessible any more after browser restart (without logout)
and I get a new session_id() is that normal?

allowAutoLogin is set to true

Also also thought about a second session object extended from CDbHttpSession to store the user session data in another table.
But it seems that CDbHttpSession stores any value from $_SESSION into the database.

and somehow I can't get it working so that the data of the second session object is stored into another table instead of yiisession.

Any help appreciated.
regards Horizons
0

#2 User is offline   itmagetan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 90
  • Joined: 25-February 11

Posted 08 October 2011 - 06:08 PM

I think you must use cookies. This might help.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users