Login - username and email address

Enter your username or password.

I want clients to register via "email" on the interface and administrators to log in via the "username" to the backend (/ admin page)

I came up with this solution:

The user table will have two fields, a username and an email address.

If the client tries to enter the interface, it will check their email, password and group_id = 0

For the administrator, he will check his username for group_id = 2

Is it correct?

+3
source share
1 answer

... , cusomter? , admin, 3NF.

, :)

+1

All Articles