Example #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);
        }
Example #2
0
 public ActionResult ChangePassword()
 {
     var form = new ChangePasswordForm();
     return View(form);
 }