Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId()); returns a empty array #449

Open
maxxer opened this issue Feb 28, 2022 · 2 comments

Comments

@maxxer
Copy link
Collaborator

maxxer commented Feb 28, 2022

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
Copy link
Collaborator Author

maxxer commented Feb 28, 2022

@MatteoF96 could this be related to your recent commits?

@squio
Copy link
Contributor

squio commented Jun 13, 2023

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 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants