How to get user role in Yii2?

Yii::$app->authManager->getRolesByUser(Yii::$app->user->getId());

Leave a Reply

Your email address will not be published. Required fields are marked *