Hi, I am still in need of the following project:
Challenge: I need to UPDATE $TABLE set inuse='0' if session ended, BUT not using the loggout button.
For example: The user closes the browser.
Let's say user logs into his/her account. login script will modify the db. (I did this already)
While, a second attempt to login to the same account, then check if session in use, if not login
successfully, otherwise display error message: "Session Already in use. Only one logon at a time
is permitted on this system". (I did this already)
If the current user clicks the LOGOUT button, then delete user row from db. (I did this already)
While, a second attempt to login to the same account, then check if session in use, if not login
successfully, otherwise display error message. (I did this already)
I need:
a) A cronjob to check every x minutes if the users session still exists
If yes, do nothing
If no, then UPDATE $TABLE set inuse='0'