How To Stop Duplicate Email

I’m trying to stop a duplicate Email address being used to create an account. When I look at how I’ve worked the condition all seems right but it won’t work.

Could someone tell me what I’m missing?

Thanks
Al.





What do you mean it doesn’t work?..

It’s impossible to create an account with an email address that’s already in use anyway (that’s standard Bubble functionality), so I’m not sure what you’re asking here?..

Besides, your conditional is on a text element… so I’m not sure what you’re expecting that to do?..

Can you be more specific as to what exactly you’re trying to do here?..

1 Like

Hi Adam and thanks for the quick response. What I was trying to say and obviously I’ve said it badly, was that if in the create account pop up the email address was already in use in the database then the text shows that says email active.

So I’m trying to figure out why my condition doesn’t work.

Also, if you’ve not already guessed I’m brand new to Bubble.

Thanks
Al.

The condition is correct. Now add this condition to the button as well.

So that if there is a user with the same email, the Create button isn’t clickable.

Himanshu
Bubble tutorials

Hi there, @alec.bancroft… a couple/few things come to mind here. First, like Adam said, Bubble has built-in functionality that stops someone from creating an account with an email address that is already in use, so there is really no need to reinvent the wheel on this one.

Second, even if you do what Himanshu said, it is still not likely going to work because if you are new to Bubble, I’m guessing you have the default privacy rule of This User is Current User set on the User data type, and that rule will prohibit the current user (i.e., the person who is signing up for a new account) from finding other users in searches.

Now, let’s say you don’t like the error Bubble shows when a duplicate email address is detected during sign up. In that case, you would have a couple of options. You could change the text of the message by going to this area in your editor.

You could also use the An unhandled error occurs workflow event in conjunction with the error code highlighted in the screenshot to detect the error and show some sort of alert that is better aligned with the style of your app.

Anyway, that’s probably more than you wanted, but hopefully it helps. The real takeaway here should be the part about the privacy rule, though. The default rule on the User data type trips a lot of new users up when they think something should be working but isn’t, so you will want to spend some time learning about privacy rules and how they affect your app.

Best…
Mike

4 Likes

Doh!

3 days I’ve been working on this. Inputting the condition over and over again. Deleting the app and starting from fresh. I even signed up for a paid account to check that was not the problem and it turns out the Privacy Rule was it.

Thanks Mike and thanks for the detailed reply, your time is much appreciated. In closing I wasn’t trying to reinvent the wheel the initial input box I was trying to make happen was the username to stop duplicates there but I thought it may not work on usernames so I’d go with what I did know it would work with for a duplicate which was the email field.

Brilliant answer and well put together so dead simple to understand the problem.

Thanks

1 Like

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