How does feature of " log in " an application work ? What attributes of user is stored in database for safe login ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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

11th Aug 2019, 11:05 AM
Deepak Bhalode
Deepak Bhalode - avatar
1 Answer
+ 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
11th Aug 2019, 5:48 PM
Ipang