Forum Academy Marketplace Showcase Pricing Features

How to force log out for a certain user using a database trigger?

I am currently implementing a soft delete feature, where someone can “delete” a user.

In my program, there is a data type called invited_user, which shares the same email as the User. When a user gets “deleted” there is a yes/no field called “removed” which gets set to yes.

I want the user to get logged out once their invited user’s “removed” is ‘yes’. I have setup a database trigger, as shown below, but I noticed there’s no action to log out a certain user.

Does anyone happen to know how to force log out another user?

Yes…if you look carefully at the screen shot you provided you will see the second action in the list is “Log the user out”…if you select this option it is used to Log a User Out…I have not tried this using triggers but I suppose the workflow action would log the user out if the data type you set for the trigger is User

I think its safer to use log out all user sessions instead.

Thanks for your input! Unfortunately the data type isn’t User, it is a data type that shares the same email as the User. I tried using the “Log the user out” action, but it doesn’t work.