[solved]Yii::app()->user

i want to know whether the user is admin i.e having administrator rights

how can i check it by using Yii::app()->user->…

i check user is guest by Yii::app()->user->isGuest();

and make the menu item visible as in blog example application…

can i get list of methods like isGuest() method.

http://www.yiiframew…oc/api/CWebUser

hi there,

Yii::app()->user uses the CWebUser class but doesnt store any access control in it beside isGuest(). so you might want to store your access control in database like administrator to certain username since CWebUser can get username out of it.

or you can read more about yii access control using http://www.yiiframew…-access-control

ok thanks

can somebody tell where is the admin role declared in the blog demo

it is used in access control

Quote

can somebody tell where is the admin role declared in the blog demo

it is used in access control

Please check accessRules() function in controller.