I have set up a workflow for users to login as follows: ‘When Page is loaded and Current User isn’t logged in’ >> ‘Show login popup’. I have also set up a logout workflow on the same page as follows: ‘When Button logout is clicked’ >> ‘Log the user out’ >> ‘Go to page index’. Unfortunately, after the Current User is logged out, the page seems to be reloading, which appears to be triggering the login workflow before the ‘Go to page index’ can be executed and as a result the login popup appears and the logged out user is not redirected to page index.
I can get around this problem by building a separate page for the login but I am wondering if I am missing something obvious. Any insights or suggestions?
i have an idea of a couple of ways you could do it,
you could have a field for type user, is logging out? and have that set to yes before going to page and have condition when page is loaded and current users logging out is yes log the user out, set logging out back to no. This works if the page needs to refresh for whatever reason.
if page doesnt refresh you could do the same thing with states,
or the easiest way is to send parameters if you dont mind having something in url
@max79268 It’s much easier (and clean) to log out the user in the same page instead of creating url things, and additional steps that really he doesn’t needs.
@andy6 Just on log out button - > Add log out workflow.
Create in the same page a separated workflow condition that runs only when current user isn’t logged in - > Do the action you want (like navigate to index page).
From your comments, I was able to figure out a solution. It seems that when the user navigates away from the pages to which their login gives them access, they are automatically logged out.