Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
User was able to register twice with the same mail Id, admin has to change the email the mail id in one account to delete the duplicate account
Comments
Comment #1
gregglesThanks for reporting this bug. It's definitely critical.
However, I was unable to observe the behavior you describe. Here are the steps I did:
1. Created a site at https://simplytest.me/project/email_registration/7.x-1.x
2. Visited the /user/register page and registered a new account with an email
3. Visited the /user/register page and registered a new account with the same email as step 2
4. Visited /admin/people/create as an admin and attempted to create an account with the same email as step 2
Expected results after steps 3 and 4:
An error message or warning without an account being created.
Actual results:
As expected.
Can you clarify how this account was made or how you believe it is caused by email_registration?
Comment #2
pramodganore CreditAttribution: pramodganore commentedI can also recreate this issue.
However, I am assuming other modules might be hooking in.
Will try to debug and update.
-Pramod
Comment #3
gregglesThanks, Pramod - I'm curious, are you testing on the same site as kaizerking or are you trying on a new site?
Comment #4
pramodganore CreditAttribution: pramodganore commented@greggles,
This is a different site.
-Pramod
Comment #5
greggles@Pramod - ok, thanks for letting me know. Can you try to repeat the issue on a fresh Drupal 7 site with just email registration and see if its possible? If not, what configuration or code changes are necessary to get it to happen?
Updating status and priority given that there's no specific set of steps to repeat the issue at this time.
Comment #6
pramodganore CreditAttribution: pramodganore commented@greggles,
I noticed that your modules works good. I had a custom validation on action element of form instead of the validate element
@kaizerking,
I noticed if you have form alters on action element of the form, (in my case, not directly on validate element of form); the custom validation is executed but all core validations are skipped.
We have a complicated environment with arrys of validations to be executed before the form is submitted. So the debug took time.
-Pramod
Comment #7
pramodganore CreditAttribution: pramodganore commentedComment #8
pramodganore CreditAttribution: pramodganore commentedI was not totally sure about moving the status to needs review. Let me know if i had to set it to something else.
Comment #9
gregglesUntil there's a clear set of steps to repeat the bug in this module it should be in "needs more info" status.
If we can't get to a clear set of steps, it should be closed as "cannot reproduce."
Comment #10
theladebug CreditAttribution: theladebug commentedI've also run into this issue. It seems that pressing register in quick succession will cause multiple registrations with the same email address.
This only occurs with the email registration module enabled. I'm currently troubleshooting to tie down the root cause.
Comment #11
gregglesVery interesting. If you disable this module does that problem remain? My guess is that it does.
I suggest trying the hide_submit module to fix that issue: https://www.drupal.org/project/hide_submit
Comment #12
theladebug CreditAttribution: theladebug commentedActually, the problem goes away when I disable the module.
We've run into a bunch of namespacing issues with hide submit and other modules so I'm afraid that solution won't work for us. I'm going to keep digging.
Comment #13
theladebug CreditAttribution: theladebug commentedJust as an FYI - I suspect this is an interaction between this another contrib module, but I havent narrowed it down to which one yet.
I removed all of our custom code around account creation and still am seeing this issue, although I can't reproduce with only this module, or this module plus a couple of others installed.
Comment #14
gregglesI tried to duplicate this behavior on a simplytest.me site.
I started a site with email_registration module enabled.
I went to the registration form and clicked the button as fast as I could - only one account was created.
I disabled email_registration.
I went to the registration form and clicked the button as fast as I could - only one account was created.
So...I'm still really not sure how to replicate this issue.
Comment #15
jay-dee-ess CreditAttribution: jay-dee-ess as a volunteer commentedHave this happening right now.
Register an account with an email address, do not verify it. Then register with the same email address and try to verify it. You now will be locked out of both accounts.
Comment #16
gregglesI tried following those steps in #15 on a simplytest.me site and when I try to register the second time I get the error:
"The e-mail address greg.knaddison@example.com is already registered. Have you forgotten your password?"
@jay-dee-ess - can you try a sandbox site to confirm if you have this problem on 7.x-1.3?
Comment #17
jay-dee-ess CreditAttribution: jay-dee-ess as a volunteer commented@greggles: Apologies. Could not recreate on a sandbox site.
Re-read through the issue and saw this from #6:
I re-worked a custom module to properly handle additional form validation. Here's what worked for me:
Comment #18
gregglesI'd forgotten about that part of #6.
So far it seems like this bug is mostly caused by custom code mistakes, so I'm going to close this issue.