public virtual ActionResult ResetPassword(ResetPasswordModel password, string @return) { var data = new JsonResultData(ModelState); if (ModelState.IsValid) { data.RunWithTry((resultData) => { UserManager.ChangePassword(password.UserName, password.NewPassword); data.RedirectUrl = @return; }); } return Json(data); }
public virtual ActionResult ResetPassword(ResetPasswordModel password) { JsonResultEntry resultEntry = new JsonResultEntry(ModelState); try { ServiceFactory.UserManager.ChangePassword(password.UserName, password.NewPassword); } catch (Exception e) { resultEntry.AddException(e); } return Json(resultEntry); }