Hello,
We have an application requirement for all users to be logged out daily at midnight. We would like to run a nightly time process. The logout action does not have any input parameters and is based on the session user id.
Thanks!
Thank you everyone for your responses. I have opened a ticket with Outsystems to help with the issue.
In the mean time, I have implemented a workaround. I set a flag in the app database for the users, and reset it every night by the timer. The next time the user accesses the application, it checks for the flag and forces user to logout.
Thanks,
Arvinder
As you found a solution yourself, I marked it as solution.
Hi Arvinder,Can you check these discussionhttps://www.outsystems.com/forums/discussion/61977/log-out-users-on-reactive/
https://www.outsystems.com/forums/discussion/89163/how-to-log-a-user-out-via-a-service-in-a-reactive-web-application/
https://www.outsystems.com/forums/discussion/35093/how-to-log-out-a-specific-user/#:~:text=You%20can%20login%20in%20the,in%20as%20a%20different%20user.
Thanks
Hello @Arvinder Bhalla
You can use a timer to schedule automatic logouts for all users on your application.
Regards
Nikhil kumar Vijay
This will never work. The timer runs in a scheduled thread, it has no context of a user let alone all logged in user.
Hi @Arvinder Bhalla,
Maybe there is a workaround by using the UpdateUser action for manually updating User.IsActive boolean attribute when someone logs into the application (true). That way you could do the same update in the Process that uses automatic activity and then assign a timer to that process to make the user inactive (false).
Hope you catch my drift,
BR
Thank you all, appreciate your responses.
The timer doesn't have any user sessions, and the dologout doesn't have any input parameter to pass the user id.
User.IsActive doesn't work either as if marked inactive, the user will not be able to login to the system,
Why do you want this ?
What underlying requirement are you trying to satisfy by logging everybody out ?
The application workflow has some role and permission changes based on an action. the new permissions take effect only after user is logged out. Some users do not ever logout and keep the session from previous days and userid is cached, so the older permissions are not cleared.
Hi,
You need to build custom logic to get the login status of user's and that status you need to check in timer action logic. And based on that you can scheduled your timer.
Thanks.
Hi! May we know what is your purpose in doing this.I can only suggest to have a site variable/maintenance and add a maintenance page in your app. This will tell the user that they can't use the app for the meantime.