0
How does feature of " log in " an application work ? What attributes of user is stored in database for safe login ?
About working of log in feature
1 Resposta
+ 1
Here's an idea of a simple login information.
- Prepare users table, unique and non null user_id as primary key. This table stores users information - user_id, name (optionally splitted as first, last name), password (hashed), register date, etc.
- Prepare user_status table, this table stores user status. A relationship must be established between user_status table and users table by user_id field, so user_id, status (0 - logged off, 1 - logged in.), last login date time etc.
- You check value of status field in user_status to get their current status. The status field value is updated when a user logs in/logs out.
What attributes of a users is stored depends on how much user information you intend to collect, there's no definitive measures I guess.
Hth, cmiiw