Yii Framework Forum: Question On Sessions Cdbhttpsession - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Question On Sessions Cdbhttpsession Rate Topic: -----

#1 User is offline   Jorgee 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 22-March 13

Posted 30 April 2013 - 03:47 PM

Hi, I've been trying to locate where the CDbHttpSession is called after login, to rewrite it.

My problem is that I have 3 products in my App, and each are restricted on X simultaneous users, so I shouldn't allow any user to access these products until someone closes session or the admin manually removes the session from the DB.

Any help on how could I achieve it?

Thanks!
0

#2 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 644
  • Joined: 23-October 10
  • Location:Romania

Posted 30 April 2013 - 04:01 PM

Maybe: http://www.yiiframew...terLogin-detail ?
0

#3 User is offline   Jorgee 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 22-March 13

Posted 30 April 2013 - 05:01 PM

Thanks, one more question, is it ok that the $_session has info? I thougth that all info was going to be saved on db and only there. Thanks
0

#4 User is offline   twisted1919 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 644
  • Joined: 23-October 10
  • Location:Romania

Posted 30 April 2013 - 05:21 PM

The data that you have in the $_SESSION is the same one you have in your database. The session class overrides the session save handler so that the data is not saved on the server in a file but rather in a database.
0

#5 User is offline   Jorgee 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 22-March 13

Posted 30 April 2013 - 07:07 PM

Thanks, so the $-session will be always populated no mather what class I use for session handle? (CDbHttpSession or CHttpSession)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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