I'm developing an application using the advanced Yii2 template.
I already have two different sessions separated for backend and frontend users. My main.php files are like this:
// frontend/config/main.php
...
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
],
...
// backend/config/main.php
...
'user' => [
'identityClass' => 'backend\models\BEUser',
'enableAutoLogin' => true,
],
...
I am facing problems when I try to implement a second separate frontend user. Right now, when I login for the different user model, I'm logged in as a regular frontend user as well.
I don't want to use RBAC, because I want the two different kinds of users fully separate. Which means, different database tables, different session names, different login pages, and access to totally different parts and pages of the website.
I think of adding a separate "user2" entry in frontend/config/main.php, but I cannot find any similar guide on the internet. So I assume this is something not possible.
Do you have any suggestions for that? Thank you.