Answer the question
In order to leave comments, you need to log in
In what tables to store users?
Suppose the site has an admin panel and a frontend.
The admin panel is multi-user, and on the frontend there is a registration and an order (with optional registration).
What is the best way to store users (and why)?
1) all users in 1 table.
2) users for the admin panel and registered; temporary orders (as in opencart).
3) users for the admin panel; registered and temporary.
The question is considered in the context of Yii2.
Answer the question
In order to leave comments, you need to log in
1 and reference books.
For the simple reason that the username is unique and must be filled in somewhere.
On the other hand, this does not prevent something more difficult to hang on the admin panel, for example, authorization using another table. But this is not point 2 - you can hang additional authorization on the admin panel, for example, through "base auth".
It will be twice as strong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question