Exemple #1
0
 private void ResetPasswordFactory(ResetPasswordViewModel model)
 {
     var response = new ResetPasswordResponseViewModel();
     response = _userService.ResetPassword(new ResetPasswordRequest { Email = model.Email }).MapTo<ResetPasswordResponseViewModel>();
 }
Exemple #2
0
 private bool EmailIsValid(ResetPasswordViewModel model)
 {
     var response = new GetUserResponse();
     response = _userService.GetUserByEmail(new GetUserRequest { Email = model.Email });
     return response.IsSuccess;
 }
Exemple #3
0
        public ActionResult ResetPassword(ResetPasswordViewModel model)
        {
            if (ModelState.IsValid)
            {
                if (EmailIsValid(model))
                {
                    this.ResetPasswordFactory(model);
                    return RedirectToAction("SendResetPasswordRequest", model);
                }
                else
                {
                    ViewBag.Message = "Email Address Not Found";
                }
            }
            else
            {
                ModelState.AddModelError("", "Invalid Email Address");
            }

            return View(model);
        }
Exemple #4
0
 public ActionResult SendResetPasswordRequest(ResetPasswordViewModel model)
 {
     return View(model);
 }
Exemple #5
0
 public ActionResult ResetPassword()
 {
     var viewModel = new ResetPasswordViewModel();
     return View(viewModel);
 }