Answer the question
In order to leave comments, you need to log in
Separate IdentityInterface for module in Yii2?
Hello!
Is it possible to make a separate authorization for the module in a separate table in the database in the basic template?
Thanks to all.
Answer the question
In order to leave comments, you need to log in
Really. Did. In the init function in the module class, you need to write something like this:
Yii::$app->set('user', [
'class' => 'yii\Web\User',
'identityCookie' => ['name' => '_adm', 'httpOnly' => true],
'idParam' => '__adm_id',
'identityClass' => 'app\modules\admin\models\Admin',
'loginUrl' => ['admin/auth/login'],
'enableAutoLogin' => true
]);
It's probably not the object
Try to write<?php echo $item->name ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question