Configure DbManager
Add authManager
component:
return [
// ...
'components' => [
'authManager' => [
'class' => 'yii\rbac\DbManager',
// uncomment if you want to cache RBAC items hierarchy
// 'cache' => 'cache',
],
// ...
],
];
Run migrations
yii migrate --migrationPath=@yii/rbac/migrations
Define User
identity
// ...
'user' => [
'identityClass' => 'M91\UserModule\models\User',
'enableAutoLogin' => true,
],
// ...
'modules' => [
'user-module' => [
'class' => 'M91\UserModule\Module',
]
]