# Change user data when they close the site

**URL:** <https://forum.bubble.io/t/change-user-data-when-they-close-the-site/242600>\
**Category:** Database\
**Created:** [January 21, 2023, 12:34am UTC](https://forum.bubble.io/t/change-user-data-when-they-close-the-site/242600 "2023-01-21T00:34:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryaavr25](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ryaavr25/32/158251_2.png) [@ryaavr25](https://forum.bubble.io/u/ryaavr25)\
**Post date:** [January 21, 2023, 12:34am UTC](https://forum.bubble.io/t/change-user-data-when-they-close-the-site/242600/1 "2023-01-21T00:34:44Z")

</div>

So I’m building a CAD and want the user’s current community, department, identifier, server, and duty status to change when they close the page without using the “Log out of patrol” button which does all that. Is there a way to accomplish this? Thanks!

---

<div class="post-metadata">

**Author:** ![Eugene\_West](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/eugene_west/32/106508_2.png) [@Eugene\_West](https://forum.bubble.io/u/Eugene_West)\
**Post date:** [January 21, 2023, 1:26am UTC](https://forum.bubble.io/t/change-user-data-when-they-close-the-site/242600/2 "2023-01-21T01:26:46Z")

</div>

> [@How to check did the user close the app page?](http://forum.bubble.io/t/how-to-check-did-the-user-close-the-app-page/153376):
>
> So I’m planning an on-demand platform app and I need to check is the expert (or driver like in uber) is online in order for customers to see what experts are online. I have a is online? on the user DB and when the header is loaded it would set the field to “yes”. However, I’m unable to make it go to “No” When the user closes the app page, is there any method/plugin to detect did the user close the web app page and is now not online?
