Hello
I can register several(distinct) users with the same email address.
I see that in SecurityUtility.cs the code
errorMessage = String.Empty;
MembershipCreateStatus createStatus;
membershipUser = Membership.CreateUser(userName, password, email, null, null, isApproved, userId, out createStatus);
switch (createStatus)
{
case MembershipCreateStatus.Success:
try
{
if (customAction != null)
{
customAction(membershipUser);
}
}
catch (Exception ex)
{
log.Error(ex);
Membership.DeleteUser(userName);
throw;
}
break;
case MembershipCreateStatus.DuplicateUserName:
errorMessage = ErrorMessages.Membership_DuplicateUserName;
break;
case MembershipCreateStatus.DuplicateEmail:
errorMessage = ErrorMessages.Membership_DuplicateEmail;
break;
case MembershipCreateStatus.InvalidPassword:
errorMessage = GetInvalidPasswordMessage();
break;
default:
throw new ApplicationException(String.Format("{0} [{1}]", ErrorMessages.Membership_Create_UnknownError, createStatus));
}
If I use the same email address twice I do not hit the MembershipCreateStatus.DuplicateEmail, it goes on the success path.
Please help.
Regards
This content has not been rated yet.
265
Reputation
29
Total posts