It would be handy to have a new workflow action under ‘Account’ > ‘Log out another users session’. A few use cases:
- Dashboard where admins can disable users, they would change the user data object but also force the log out to that user
- Updates/upgrades to an app, forcing all users to log out e.g. maintenance, migrating data or changes to core data where its necessary no data is touched during a certain period.
Just a quick update to this post - something I haven’t really tested till now is that using the below workflow action ‘Do when condition is true’ (set to Everytime) will work with real time data changes. So in the event that a user does become inactive (via User > Inactive yes/no field) it will trigger the workflow action, rather than having to wait for a page load (like the workflow event in red).
Test page here to demo the workflow action running when logged in and then toggling the inactive = yes or now
Credit to @eren for a discussion about this idea/topic.
So while this idea could be useful, I guess its not an essential feature - it could just expand the toolset Bubble offers and provide another method of doing x and y actions.
So this would require that the page is open?
Would this work as a backend workflow to log out users who were inactive?
My app would need similar functionality, a user dashboard to disable and enable users without deleting them. It’s kind of a workaround I guess, but I have a header element on every page of my app, and in the header’s workflow I added a “Do when condition is true” event with the condition “Only when Current User’s Active is no” (yes/no field under User). Just tested it out and it works.
For the login page I set up the condition for the Login button so it does a search for the Username entered in the username box, and if the “Active” field returns “no” then it shows red warning text saying the user’s login is disabled. If the Users “Active” is yes then it logs them in.