Problem with CWebUser::getState

Hi for all. I have some problem then using CWebUser::getState method.

In my CUserIdentity i have:




// if authentification seem's to be ok

$this->_id = $user->user_id;

$this->setState('birth', $user->birth);

$this->errorCode = self::ERROR_NONE;



Then, in the view i’m trying to use getState method:




if(!Yii::app()->user->isGuest)

{

    echo CHtml::encode(Yii::app()->user->birth);

}



And then I get an error: [color="#FF0000"]Property "CWebUser.birth" is not defined.[/color]

Yii version: 1.1.3

Can anyone help me?

Did you use the CUserIdentity class as input to


Yii::app()->user->login

?

Also, are you attempting to access this information between requests? If so, did you enable cookie-based authentication (by setting


[url="../doc/api/CWebUser#allowAutoLogin"]CWebUser::allowAutoLogin[/url]

to be true)?