Page 1 of 1

double email

Posted: 2021-01-24 08:27
by riko01
I tried signing up with a different username and the same email.

example:

user A.
username: testa
email: [email protected]

User B
username: testa1
email: [email protected]

and registration is successful.
how to handle it? whether there is no default setting from appgini. should we hook code?

Thanks

Re: double email

Posted: 2021-01-24 08:58
by onoehring
Hi,

well, is this a bug or a feature? I am not so sure. Allowing different usernames with one email address might be uncommon, but (at least for me) it's great for testing.
You can use this quickfix: Use phpmyadmin (or adminer or similar) and alter the membership_users table: Set an index UNIQUE on the field email. Done. From now one, there can be only one username using an email address.

Olaf

Re: double email

Posted: 2021-01-24 09:19
by riko01
Thanks onoehring for your response.
I'm not sure if these are bugs. previously I have done as you suggest.
in the released future, double email prevention setting may be the default

Re: double email

Posted: 2021-01-24 10:16
by jsetzer
I totally agree with Olaf concerning testing with different users but identical email address.

Additionally, consider creating a unique index on membership_users.email column by code in case you are not on localhost using a SQL command. Doing it by code will save you time on every deployment/installation.

Re: double email

Posted: 2021-01-29 14:58
by pfrumkin
I agree with Olaf and Jan, there can be business reasons to use the same email address with multiple login IDs. It is presumptuous to disallow that. Perhaps make it an option, sure, but not sure it's worth it for AG. Olaf has a great workaround (defined here as simple and straightforward).

~Paul

Re: double email

Posted: 2021-01-29 22:45
by baudwalker
One can see a problem with having 2 or more users using the same email. How would the program handle retrieving a password if the email address is used. Which users password would be reset?

In these days of hotmail, gmail and the like there is no reason for many people using the same email in this instance.

Re: double email

Posted: 2021-01-30 09:00
by onoehring
Hi

interesting train of thought the email recovery. Either only 1 email is sent - of multiple emails for each account .. which will target the same email address. So there should be no problem. We can just try what happens :-)

Olaf

Re: double email

Posted: 2021-01-30 10:22
by baudwalker
The answer is that you get no emails.

Re: double email

Posted: 2021-01-30 11:51
by onoehring
Hi,

oops, that's unexpected ... I tried and can confirm ...and imho should not be the case.

Olaf

Re: double email

Posted: 2021-02-01 07:58
by baudwalker
One of my projects has about 1000 users. Some time husband and wife try to use the same email. Like myself the users are mostly seniors and often forget their passwords and cannot retrieve it due to the emails not being unique. I advise them to get a hotmail or gmail account and forward the emails to their common account, this works well.

Re: double email

Posted: 2021-02-06 10:48
by a.gneady
Hi everyone ... I'm proposing a fix to this issue here: viewtopic.php?f=11&t=4170&p=16402#p16402
Kindly check this thread and let me know your thoughts.