D
D
Denis Shevchenko2017-05-09 21:05:37
MySQL
Denis Shevchenko, 2017-05-09 21:05:37

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

2 answer(s)
D
Dmitry, 2017-05-09
@slo_nik

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.

M
Maxim Timofeev, 2017-05-09
@webinar

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 question

Ask a Question

731 491 924 answers to any question