Hello,
I’m trying to log in a user but only if he validated his account.
I have a field in my db called “Is validated” which can be yes or no.
My workflow is :
-
click on the login button
=> logs the user in
=> Set state userValidated = search for users’ count where email = input email’s value AND is validated = yes
=> Show message alert “account not validated” only if userValidated = 0
=> Logs the user out -
click on the login button
=> logs the user in
=> Set state userValidated = search for users’ count where email = input email’s value AND is validated = yes
=> Terminate this workflow only if userValidated = 1
For some reason, I’m not able to login because the variable userValidated is always 0, even though in the database, I have some users that have “isvalidated = yes”
Any idea of what I’m doing wrong here ?
Thanks for your help.