A client has Email/Username as AlberT@mail.com
When client forgets the password, he/she logs in. He/she enters an email address as albert@mail.com and it gives an error “your email address doesn’t match it’s case sensitive”, later goes back and enters AlberT@mail.com and the change of the new password has been accepted because of email address: AlberT@mail.com
How to fix this issue to avoid email address been case-sensitive by accepting both email address to take effects the change for update new password either he/she types AlberT@mail.com or albert@mail.com
Thanks for your help.
See code below: (where to find if email address is not case-sensitive> or add to not be case-sensitive)
<div class="editor-field" id="emailField">
<div class="editor-field">
<input style="width: 306px;" class="form-control" id="EmailAddress" name="EmailAddress" type="text" value="" placeholder="Email Address"" autocomplete="off">
</div>
</div>
Several misc line to figure out where is emailaddress
// We have received a properly formatted email address
AccountVerification verification = AccountVerification.LoadByEmailAddress(model.EmailAddress);
verification.EmailAddress = model.EmailAddress;
public static AccountVerification LoadByEmailAddress(string VerificationCode)
{
return new Data.AccountVerification.LoadByEmailAddress(VerificationCode).Result;
}
public LoadByEmailAddress(string emailAddress)
{
EmailAddress = emailAddress;
}
public ActionResult PasswordReset(string id, string VerificationCode)
{
string Code = id ?? VerificationCode;
AccountVerification verification = AccountVerification.LoadByCode(Code ?? "");
if (verification != null)
{
ViewBag.Email = verification.EmailAddress;
ViewBag.Username = verification.Name;
// ViewBag.Verification = verification.VerificationCode;
}
else
{
// If we got this far, something failed, redisplay form
ViewData["PasswordLength"] = Util.MinPasswordLength;
ViewBag.UserName = model.Username;
ViewBag.Email = model.EmailAddress;
return View("PasswordReset");
}
}
public ActionResult CheckEmailAddress(string emailAddress)
{
if (!string.IsNullOrEmpty(emailAddress))
{
return Content(emailAddress.IsValidEmail().ToString());
}
else
return Content("False");
}
//Validate Email Address Format
if (!new ValidateEmailAddressAttribute().IsValid(customer.NotificationEmail))
ModelState.AddModelError("NotificationEmail", new ValidateEmailAddressAttribute().FormatErrorMessage("Email Address"));
Thanks for your help.