$This->Getstate Not Working

hi every body

i make a rapid test to authentication system

in cuseridentity file

    public function authenticate()


        $this->setState('mo', 'xcvcx');

        return true;


in login controller

    public function actionLogin()


        $identity = new CUserIdentity('1234', 'yyuu');



in index action

    public function actionIndex()


        if (!yii::app()->user->isGuest) {

            echo yii::app()->user->mo;




but a problem ocuurs that mo is not defined so what is the error i done?

hay gays i solve it

i forgot to call


that’s it an it’s working now