Issues with workflow conditioned by Users' email address value matching with input

Hi dear Bubble community,

I am facing two issues with my app that look quite the same. I’ll explain oth of them.

Issue 1 : Building a “reset password” page displaying whether or not the email address already exists in the system

Basically my workflow looks quite simple : if the currently logged off user uses an email address which exist already in the system, I’m sending a “reset password” email and displaying a message “a link has been sent”. On the contrary, if the currently logged off user is trying to reset the password of an email address which is not in the system, I tell him “there’s no account associated with this email address, you can create an account here”.

Here are my workflows :


That is the workflow “OK, there’s a user with this email address, send an email and show green popup”


That’s the workflow “Oops, there’s no user with this email address, create an account here, and show red popup”

My issue here is that the app always displays the red popup and follow the second workflow, though I know for sure that there is an existing user with the email address I put in my input box.

I don’t know if this is linked to privacy rules but I can’t find the solution so far.

Second situation : Allowing people to create an account if there email address matches with an existing thing’s email address

People can process payments and place orders on my app without an account. I am then sending them an email “if you want to access all of your receipts for ever and ever, create an account”.
When they come back to the app to create an account, I want the email address they write in the input to match with the email address of their previous orders, otherwise anybody could just click on their personal link, and create an account with a different email address.

Same story, I have two workflows checking if the email address of the input matchs or not with the thing’s email address, and again I am stuck with the second workflow.

First workflow (when we find a matching thing, workflow which doesn’t work)

Second workflow (when we do not find a matching thing)

Thank you in advance for your help, if you need more information, let me know.

Pauline

Try this:

Search for users: First item empty
Search for users: First item not empty

@Timbo thank you so much for sharing the trick !

It’s working perfectly now :pray: :people_hugging:

1 Like

I have this exact same problem with Seach for Users(email=email input’s value):count ALWAYS being 0, even when you can clearly see that email in use in the list of Users, however, :first item is empty & :first item is not empty also do not work for me, because :first item is always evaluating as empty.
image


The condition in the Search for Users expression here is email = Input Email Address’s value. The email shown is 100% tied to a User in the bubble app, but first item is still empty and count is 0. What is happening? Do I really need to store data in a separate database to be able to reliably find out if an email is already being used without first trying to create the account?

Ok, so I haven’t figured out my underlying problem, but this bandaid solution can prevent the canned error message from being shown, and allow an onboarding process to continue gracefully while notifying users that the email is taken. ‘An unhandled error occurs’ can’t tell them before you try to sign them up, but it does at least allow you to reliably account for situations where an email is already associated with a User.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.