M
M
Mikhail Shatilov2014-11-23 15:29:15
MySQL
Mikhail Shatilov, 2014-11-23 15:29:15

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

3 answer(s)
S
Sergey, 2014-11-23
Protko @Fesor

3)

X
xmoonlight, 2014-11-23
@xmoonlight

1 and properties.

A
Anton Korzunov, 2014-11-23
@kashey

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 question

Ask a Question

731 491 924 answers to any question