public virtual ActionResult VerifyChangePassword(VerifyNewPasswordModel model) { try { if (string.IsNullOrEmpty(model.Key)) { ViewBag.Msg = "No Token found."; } else { if (webSecurityService.ConfirmPasswordChange(model.Key, model.NewPassword)) { ViewBag.Msg = "Verified!"; } else { //Couldn't verify. PLease register again. ViewBag.Msg = "Account couldn't be Verified."; } } return PartialView(Views.Password.ChangePasswordSuccess); } catch (Exception e) { ViewBag.Msg = "Account couldn't be Verified."; this.emailHelper.SendErrorEmail(e as Exception); } return View(WENEEDUHAVE.Error.Views.Index); }
public virtual ActionResult VerifyPassword(string id) { if (string.IsNullOrEmpty(id)) { ViewBag.Msg = "No Token found."; } VerifyNewPasswordModel model = new VerifyNewPasswordModel { Key = id }; return View(Views.Password.VerifyChangePassword, model); }