Deleting Users and preventing them being able to log in after

I’ve created a UserDeleted field in my Users data. It’s set to be a Yes/No field with default of No.
If a User deletes their account, I update this to “Yes” and I can set filters elsewhere so that lists of Users only show ones where “UserDeleted = No”
How do I then disable that user being able to log back in as this user? Do I use the “only when” on the Log User In workflow as here…

Screenshot 2024-01-11 144539

In which case how does “Current User” apply if the User isn’t logged in?

Hi @joefarrowsmith :wave:

After you log the user in, you log the user out if the Current User’s UserDeleted is YES and show him some error message…

1 Like

Ah now that’s clever! Thank you!
I doubt I’d have thought of that…been a long week so far.
All the best
Joe

1 Like