public ActionResult ChangeEmail(ChangeEmailModelDto model) { if (this.ModelState.IsValid) { this.accountService.ChangeEmail(model); return this.RedirectToAction("Index"); } var viewmodel = this.accountService.GetAccountDetailsViewModel(); return this.View("ChangeEmail", viewmodel); }
public void ChangeEmail(ChangeEmailModelDto model) { var currentUserId = this.authentication.GetCurrentUserId(); this.userRepository.ChangeEmail(currentUserId, model.Email); }