I am not having any success with the application showing the correct information for when a user is logged in or logged out.
I have gone so far as to log each user in and then log them out using my test data. Every time I tried to do this it failed to produce correct results for users who were logged out.
I decided to see if my logic was flawed and added a datafield to my user datatype of logged in and logged out. When I reference the datafields I created my logic and workflows work fine, so it seems that there is something wrong with the internal system of logging a user in or out and labeling the true false portion correctly as each time I logged a user out the user was logged out successfully however the internal boolean for is logged out did nothing.
Hello, could i see your workflow?
maybe you are confusing âlog outâ with âlog out other sessionsâ
I have done that before.
My log out action is working fine.
@anon65040322
The problem isnât actually the log out portion. The user does get logged out correctly. I tested that and saw users being removed from the logged in repeating group.
However, the issue is that the user is not having their true/false datafield of user isnât logged in ( and I am assuming the user is logged in value as well ) changed correctly. Unfortunately, that is a datafield that I assume is native in bubble as I am unable to locate or manipulate it.
So I donât actually have a workflow that is able to change that to the appropriate settings on a user log out. The workflow I used for user logout is below.
When I set user isnât logged in equals yes; nothing appears in my repeating groups. However, it will be removed from the repeating group of the user is logged in equals yes.
âis logged inâ is a property of the âCurrent Userâ object. (Current User is a metaphor for âthe entity viewing this pageâ.)
There is no âlist of Current Usersâ. There may be 1000 entities viewing pages in your app. Each of them â to them, and to your appâs logic â is Current User.
If you want to add a notion of user presence to your app, you can do it, but itâs not a simple concept. @AliFarahatâs âEfactiveâ plugin is used by some to add active/idle/hidden presence detection and seems to be well regarded (Iâve not played with it myself).
Aside: If you want to understand user presence in general, this video from fireship.io is pretty awesome. The video itself is about coding a presence system using Angular and Firebase, but even if that makes no sense to you, the discussion of presence and the requirements there is really helpful:
I will give the plugin a shot and see how it works for me. I used an exit intent plugin as well, but canât seem to figure out how to test two users at the same time to judge how it works.
Thanks, I probably wouldnât have thought about thatâŚtook me reading online to attempt a different browser to test some HTML and still didnât consider it for this.
The one issue with using Data to show whos online/offline is that when someone Clicks off the browser rather than Logging out (Which most people do) makes the Data âlogin/outâ stay the same as it was before they clicked off. I would suggest using the âOut of browserâ plugin or something along those lines where when the user goes above the HTML box itâll popup a box saying that itâs better to logout rather than click off. But itâs all up to you