I tried CWebUser::getIsGuest () in my menu component but it pulls out an error like "MainMenu does not have a method named “getState” so I’m not sure what I did wrong.
I tried CWebUser::getIsGuest () in my menu component but it pulls out an error like "MainMenu does not have a method named “getState” so I’m not sure what I did wrong.
[/code]
[quote="manilodisan, post:1, topic:43273"]
I tried CWebUser::getIsGuest () in my menu component but it pulls out an error like "MainMenu does not have a method named "getState" so I'm not sure what I did wrong.
[/quote]
This should work:
[code]
Yii::app()->user->isGuest
The application object defines, among others, the "user" core application component of class CWebUser.
/Tommy
Thanks Tommy,