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"


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


 //to get the variable back 



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

Any suggestions?


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.