Icon color change when users are logged out

Hi All

I have an employees list to show which users are logged in/out
now when they are logged in, the icon goes green, and not logged in must be red. Now i created 3 test profiles, but they all show green, even with them being signed out.

How can i get users who aren’t logged in to show red icon?

I used conditions on the icon: red: Current cell’s user isn’t logged in
Green: current cell’s user is logged in

maybe just have a red icon by default and only add the condition green for when the user is logged in?

I tried that, but it still shows that all 3 test profiles are logged in (Showing green)

I think I recall another thread talking about how the “user isn’t logged in” doesn’t work like this. I know some folks had to go to some pretty insane lengths to get a status indicator like what you’re looking for, like keeping a log of every single interaction a user does, and checking to see if the last interaction was made less than 5 minutes ago. It looked like a pain. If I find the thread, I’ll add it here.

I would think the easiest way is to create a field called is_loggedin in the user table.

Then in your login event you set this field to 1 when user logs in. When they log out set it to 0.

Now in the conditions of the icon if user is_loggedin field is 1 then set to green.

Sorry i am still new to this whole thing and still learning.

Can you please explain this more in detail?

I have edited my reply.

The issue with this approach is that most users don’t explicitly “log out.” They’ll close the browser window or walk away, but won’t always hit the “log out” button, meaning this may never change back to zero.

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