Ejemplo n.º 1
0
        public ActionResult ChangePassword(ChangePasswordForm form)
        {
            // prevent hackers!
            form.UserName = User.Identity.Name;

            _changePasswordFormValidator.Validate(form).Populate(ModelState);

            if (ModelState.IsValid)
            {
                _userService.ChangePassword(form.UserName, form.NewPassword);
                return View("ChangePasswordSuccess");
            }

            return View(form);
        }
Ejemplo n.º 2
0
 public ActionResult ChangePassword()
 {
     var form = new ChangePasswordForm();
     return View(form);
 }