Possible Duplicate:
Check if user is offline
I'm building a community website. Users will login and logout as usually. I use the attribute status online/offline to set the user's status. But what if a user just clicks the X button or disconnects otherwise without logging out? it shows login status.How i get to know user is currently online or not ?