Page 1 of 1

No Duplicate Checks for Email Address: Is this correct?

Posted: Thu Jan 10, 2013 3:05 am
by SuperMindConsulting
I hope someone can help with something.

Basically, I am able to REPRO this problem:

If 2 users with different usernames are setup to have the same email address, then only one of them would ever be able to reset their password using forgot password. I assume any opt-out email subscription tasks may also not work correctly.

Is this expected behavior in AC?

I understand that the UserName field is checked for uniqueness. I also understand that when a user first registers or when an Admin creates a new user, their email is used as the username (by default).

Since AC allows users/admins to change usernames, uniqueness is also checked on those related pages. This is all fine, and works as expected.

Now, for email addresses, I would think this would be same case.

Based on the following:
1 UserDataSource.GetUserIdByEmail(string email) RETURNS a single int
2 According to help page for AC Customer Profile http://help.ablecommerce.com/mergedProj ... rofile.htm ....
...There can never be duplicate email addresses in the store....

(perhaps the comment was mainly for username purposes)
3 I see on AbleCommerce.Admin.People.Users.AccountTabPage AccountTabPage.ascx, there is a Custom Validator called EmailAvailableValidator:

Code: Select all

<asp:CustomValidator ID="EmailAvailableValidator" runat="server" ControlToValidate="Email" ErrorMessage="The email address '{0}' is already registered to another user." Text="*" />
It is not really wired up to Server side method, nor is it used in the code behind. That being said, I have noticed on other pages/controls where this validator's IsValid property is set via some logic checks during the SAVE method. This is not the case on this particular page.

I've confirmed this in:
[*] AC GOLD build 5078
[*] AC 7.0.4 build 13424

Thanks for any help. Perhaps I am just missing the obvious...

Re: No Duplicate Checks for Email Address: Is this correct?

Posted: Mon Jan 21, 2013 4:22 pm
by Logan Rhodehamel
SuperMindConsulting wrote:If 2 users with different usernames are setup to have the same email address, then only one of them would ever be able to reset their password using forgot password.


This is correct. Although, if the email addresses are the same they are in most cases going to be the same person. In the case of a conflict like this we return the user account most recently created.