I have a strange situation where my workflow with “only when” conditionals works perfectly in development preview, but not in live.
For users who forgot which email they signed up with, I want to let them enter an email address into an input form and find out whether that email address is in my database.
I created a workflow that allows them to check, then either returns a “this email is not in our database, try again” OR “this email is in our database, click below to send a password reset email,” which also un-hides a “send email” button. I used hide and show functions in my workflow, modified with “only when” statements. The statement for returning that the email in the input is not in the database is:
Only when: (do a search for: Type User, constraint: email = Input “enter your email”'s value) count: is 0
The statement returning that the email from the input is in the database is the same to start, but I have used:
count: is not 0
count: > 0
count: ≥ 1
count: is 1
All of the above work in development preview as expected.
But none of them work live. Even when I enter an email I know is in the database, it returns “not in database.” Any idea why?
Here is my “not in database” conditional. NOTE: the main “only when” conditional is in yellow only because I had to click it to open up the “do a search for” window. It resolves to blue when I close that.
Here is the workflow. NOTE: I hide both messages at the start of the workflow because the user may make multiple attempts, so I want to start from scratch and only show the one message.
Hi there, @tryingtomakeanapp… I’m guessing this isn’t it, but just to rule out the obvious… do your development and live databases have the same data in them?
@mikeloc No, there are about 100 test accounts in development and many more real accounts in live. But I am testing in development preview with emails I know do and do not exist in the development database. And testing in live with emails I know do and do not exist in the live database.
It shouldn’t be, if you are sure the emails you are testing in live are actually in the live database. Any change you have different privacy rules set up in development that you haven’t pushed to live yet?
@mikeloc no, but privacy rules is a good thought. Could the development preview override them? Here are my User privacy rules, identical in live and dev
By the way, someone is probably going to mention it, so it might as well be me.
What you are doing here (giving users an interface that lets them find out if a particular email address has an account in your system) is not such a great idea from a security perspective. Just food for thought there.
With that privacy rule in place, I’m not sure how it even works in development because you aren’t letting users search for and find data that is not their own data (and they need to be able to do that if they are not logged in and they are trying to search for an email address). Just to see if you can get it to work, try checking the Find this in searches box under Everyone else.
Hmm. I’ll take a closer look at how those work. I’m learning as I go, I’m not the original builder of this app but I’ve been handed the keys.
And I appreciate your comment on security. I’m aware, but due to some choices of the previous admin, I spend a lot of time answering emails from people who are sure they signed up with one email, but in fact used another. I was hoping to remove some of my email workload at the expense of security. But it may be a bad idea.