I need some helps with this.
I write a module to show user online in my system. I checking user logged in to system by using token.
In my database, table user has "token" field. When user loggin to system, token was created and update to databse. Opposites, when user click to logout links, token will be destroyed.
But i have a problem, when user close browser and don't click to logout link, how I can delete their token.
Hope you understand the question. Please help. Thanks