Berat Emre Nebioglu
Berat Emre Nebioglu

Reputation: 49

Find Out How Many Times User Logged Out

I have a system already built in which users get automatically logged out after a certain period of time. What I'm trying to do is find out how many times a specific user was logged out.

How would I accomplish this?

Upvotes: 1

Views: 203

Answers (2)

Louis XIV
Louis XIV

Reputation: 2224

Just count how many times the user log in... It's exactly the same, no?

Upvotes: 0

Refugnic Eternium
Refugnic Eternium

Reputation: 4291

I'm not quite sure if I understand your question correctly, but here goes anyway:

You said you have a database backing you up. Use it. Create a field stating LastActivity, which you update each time the person does something on your website. If the LastActivity has been too long ago, disconnect the user from the website (by killing the session). At the same time, you can update some sort of field, which counts how often that user has been 'forced to log out'.

Upvotes: 3

Related Questions