public JsonResult ChangeUserPassword(int iUserID, string newPassword) { var objUser = _CU_EmployeeService.GetModelByID(iUserID); _CU_AcountService.ChangePassword(iUserID, newPassword); var mailResult = MailService.ChangePasswordMailByAdmin(HttpContext.Request.Url.Host, objUser.Email, newPassword); return(Json(new { d = mailResult }, JsonRequestBehavior.AllowGet)); }
public ActionResult SubmitChangePassword(ChangePassWordModel model, UserProfile profile) { _AccountService.ChangePassword(profile.Id.Value, model.NewPassword); // MailService.ChangePasswordMail(HttpContext.Request.Url.Host, profile.Email, profile.LoginName, model.NewPassword); return(RedirectToAction("Default")); }