Question about session

Hi everyone,

i have saved variables in session By default (Guest) by using the Yii::app()->user->setState(‘variable’=>“foo”).

then i want to make a login with $model->login().

if i want to do a login, the variables that are saved in session will be dissapeared ?

set "autoUpdateFlash=>false"

autoUpdateFlash

setting it false, which means flash message will be updated until its get.(bad english sorry)

sorry but those are flash messages, i want to hold on the variavbles in session set by Yii::app()->user->setState() function, not that are set by Yii::app()->user->setFlash() function …

your session setState is wrong

use this




         Yii::app()->user->setState('variable','foo');




 //to get the variable back 

 Yii::app()->user->getState('variable'); 


 

i’ve got the same problem and this solution doesn’t help.

Any suggestions?

thx

It seems to me too complicated…

Why don’t you simply store your data in $_SESSION ?

Additionally, play with setState ONLY when the user isn’t a Guest.