Logins

 


There is a table in the database called "logins". When someone logs into the admin app, a new record is created in this table. When someone logs out, this record is deleted


The database table looks like this:

The record is created when someone first logs in. Each time they do something, the "updated_at" field is populated with the current datetime. So there is just one "logins" record per login. A new record is not created. The same "logins" record is updated. So a "logins" record represents the last activity a user did whilst logged in.