Answer the question
In order to leave comments, you need to log in
How to properly check access in yii-rights?
The code:
var_dump(Yii::app()->user->checkAccess('Authenticated'));
Yii::app()->user->isGuest
Answer the question
In order to leave comments, you need to log in
There is an entry in the AuthAssignment table
where 11 is just the user id.
There is an entry in the AuthItem table
Dump user shows
RWebUser Object
(
[allowAutoLogin] => 1
[guestName] => Guest
[loginUrl] => Array
(
[0] => /user/login
)
[identityCookie] =>
[authTimeout] =>
[absoluteAuthTimeout] =>
[autoRenewCookie] =>
[autoUpdateFlash] => 1
[loginRequiredAjaxResponse] =>
[_keyPrefix:CWebUser:private] => 57e2c94f32f56d824ec3d429c04b1a90
[_access:CWebUser:private] => Array
(
)
[behaviors] => Array
(
)
[_initialized:CApplicationComponent:private] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question