Log user disconnection
Log user disconnection
Hi.
Is there a way to log on database when user disconnect or close his browser ?
Perhaps add record each (60sec) in a rotative log (but afraid time consumption...) so when disconnected, no more log will be write and then can see last log as disconnect time...
Some idéa ?
This question has accepted answers - jump to:
Answers
This isn't really a DataTables specific question, but rather to do with your session controller. In the logout controller you could write an entry to the database there.
Allan
Hi @allan
What's matter if user close his browser directly ? Do disconnect script occurs or not (I think not). If I'm right, so I can't know if a user is disconnected or not...
Yes, all session management will suffer from that. Depending on what session manager you are using, there might be some sort of timeout. Or you could use a web-socket. But that is really a question for whatever session manager software you are using.
Allan
Hi @allan
Thank for help.
I'll log each session restart (each global action start) the time... Not very well but do the job.
I'm more disapointed about chrome zoom...
Bob