Bubble believes user is logged in (but is not)


I was going to setup a simple indicator of whether a user is logged in or not. However, it doesn’t seem to work as expected:

I control the other user login with another email address, and it is clearly not logged in.

The way I set things up is in this repeating group below, where each user is taking a spot in the repeating group.

The “Online” text is set as an empty text field, with conditions to change the field text depending on current cell’s user being logged in or not.

While player 1 and 2 are logged in (one on browser, the second on incognito), the third isn’t logged in at all at this point.

And yet, as you can see, it says all are logged in. :thinking:

Help me understand what I don’t yet. :sweat_smile:

Can you share the setting of parents group so we can see how you set up the user logged in information and where this come from?
The only way to do that is if you store this information in DB

So I have a “player” item and that player has a “user”.

So you’re saying a user cannot see if another user is online unless I’m storing this information in the database?

Exactly. Normally you can select “Current user” is logged in. But there’s no option to say: Specific user is logged in (another user). So you need to store this information when they login and logout.
Now… will this be enough for you? Maybe not. If user close the browser, nothing will tell you to update your DB and set user logged out or away. So you need to use plugins for that.

Though the condition does let me query if the user is logged in as in “current cell’s player’s user is logged in” yes or no.


Why would it let me do that if it can’t?

If user close the browser, nothing will tell you to update your DB and set user logged out or away.

Yeah that’s exactly what I’m trying to get at.

Install a plugin for that. Depending if you want to detect if user is not looking at the browser tab or just detect if user close tab or browser, there’s different plugin you can use (detect presence, page close detector…)

It may be the purpose of the is logged in or not (when you useDB user) but it may not work so maybe you can create a support ticket to know more about that.

Look at the below app:

Uses the following plugin below.

1 Like

Thanks for this. When I look at the plugin description, it seems to look for “mouse leaving page” and “pressing back button”.

There’s a number of cases where “mouse leaving page” does not mean a user is logged in or not, and there are a number of cases where the user could leave the page without doing any of these two actions (press Alt + F4, browser crashes, etc.).

Why did you setup the user attributes the way you did? I’m not sure to understand.

I’m not too convinced about this plugin though.

As a workaround: I’m thinking of a “do every 3 seconds” workflow and record a “last online” timestamp.

Would that work? I’ll give it a try anyhow.


Gave a try to the “do every 3 seconds” > timestamp and it works fine:

Happy with that now :slight_smile:

Try to combine it with the plugin that checks for a user Idle time after they leave the page.

This topic was automatically closed after 70 days. New replies are no longer allowed.