public ActionResult ChangeEmail(ChangeEmailModel changeEmailModel) { var user = User.Identity.Name; var adm = AccountDataMapper.GetAccountDataMapper(); var acc = adm.GetById(user); if (ModelState.IsValid) { if (!changeEmailModel.OldEmail.Equals(acc.Email)) { ModelState.AddModelError("OldEmail", "Esta conta não está associada a este email"); return(View(changeEmailModel)); } acc.Email = changeEmailModel.NewEmail; LoginUtils.AddToConfirmList(acc); FormsAuthentication.SignOut(); return(View("Confirmation")); } return(View(changeEmailModel)); }