Hello,
Can I add a default role for an unauthorized user? If yes then how?
Regards,
Hello,
Can I add a default role for an unauthorized user? If yes then how?
Regards,
It looks like that you can add the default role in AuthManager, you can configure in config/main.php:
'authManager'=>array(
'Class'=>...
'defautRoles'=>'unauthorized'
),
And then create the role unauthorized using a biz_rule, for exampler ‘Yii::app()->user->isGuest’ will make so that this role will be applied to not-logged in users.
I cannot immagine what for to do it, there are already selectors for guest user.
Thanks zaccaria for replying. Yes you are right, at first I thought I need to assign a default role to users but after posting the message, I thought about it again and this time I said to myself “What was I thinking???”