I am currently facing a challenge with displaying user log in time details. I have two tables set up for this purpose - UserMaster, which contains UserDetails, and UserLogInTimeDetails, which includes columns for UserId and LogedInTime. Whenever a user logs in, their UserId and LogInTime are stored in the UserLogInTimeDetails table. However, when a user logs off, I delete the corresponding row from UserLogInTimeDetails.
The issue arises when a user closes their browser without logging off. In such cases, the user's details remain in the UserLogInTimeDetails table, preventing them from being able to log in again.
I have searched online and found that handling browser close events is not feasible. Many sources suggest using the onbeforeunload event, but unfortunately, it has not been effective in my situation.
If anyone could provide assistance or solutions to this problem, it would be greatly appreciated. Thank you.