Answer the question
In order to leave comments, you need to log in
Yii2 users how to implement work with different models?
I am developing a small portal, I use budyaga\users for authorization. As a result, we have a user table with a certain set of parameters. But the portal requires authorization both in the client and in the administrative part. The admin and the client have fundamentally different required parameters. The question is how best to organize a structure in which admins and users will be stored in different tables, but logged in through a single user interface.
Answer the question
In order to leave comments, you need to log in
Good evening.
So what's bothering you?
Create additional two tables, for admins and users. Do authorization through a single interface and link tables by user id.
1 table
1 user model
as many authorization and registration forms as you want with different validation rules. Or customization with validation rules through scripts.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question