Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()); returns a empty array
maxxer opened this issue · 2 comments
maxxer commented
for some days after a update $roles = Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId());
returns a empty array
Originally posted by @EndErr in #442 (comment)
maxxer commented
@MatteoF96 could this be related to your recent commits?
squio commented
Please check you have this in your config:
'authManager' => [
'class' => 'Da\User\Component\AuthDbManagerComponent',
],
I had a similar issue which was caused by the default config to use yii\rbac\DbManager
(advanced template); struggled with it for almost a day 😓