Forced logout

6
Can I force a user to be logged out before, for example, starting a process which requires exclusive use of the system; and can I stop users from logging in whilst a process is in progress? I tried deleting a user's session but the user was still able to access the application, even though the session object was no longer present.
asked
2 answers
8

"Deleting" a session isn't really possible, you'd have to logout the user:

com.mendix.core.Core.logout(getContext().getSession())

As far as I know you can't prevent users from logging in.

answered
4

If with "can't login" you mean a user isn't allowed to do any actions on the system, you could set a microflow as homepage that checks a Boolean, say LoginAllowed, if it returns false you simply throw the java action Achiel made and a message saying they aren't allowed to login at this time.

I don't believe you can prevent them from trying to login though.

answered