I have a little question. I would like to check when a user was logged in the last time. If the account is inactive it will be deleted from the database. I have no clue how to implement this. or how to check the time the user has logged in the last time. Can someone help me, please... I would be very happy if someone could help me ;)
CodePudding user response:
From your question It is not clear what exactly you want but whatever I understand you can do below things
Last Login time :
- add a datetime field in database table which will hold time whenever user login.
- On login whenever user login just set current timestamp in the lastlogin table field