# Telling if a user is online or not

**URL:** <https://forum.kirupa.com/t/telling-if-a-user-is-online-or-not/282380>\
**Category:** Uncategorized\
**Created:** [February 21, 2009, 2:19am UTC](https://forum.kirupa.com/t/telling-if-a-user-is-online-or-not/282380 "2009-02-21T02:19:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michdd](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@michdd](https://forum.kirupa.com/u/michdd)\
**Post date:** [February 21, 2009, 2:19am UTC](https://forum.kirupa.com/t/telling-if-a-user-is-online-or-not/282380/1 "2009-02-21T02:19:24Z")

</div>

In a game, how would I go about keeping records if a user is online or offline? I know when they logged in it could set something in the database that would indicate that they are online, however how would I know when they logout in any other method than pressing the “logout” button? Say if they just closed their browser…
