예제 #1
0
        public ActionResult ChangePassword(String userName, String currentPassword, String newPassword)
        {
            var user = GetUser(userName, currentPassword);

            LoginServices.ChangePassword(user, newPassword);
            return(this.Direct(new { success = LoginServices.CheckPassword(newPassword) }));
        }
        public JsonResult ChangePassword(ChangePasswordViewModel item)
        {
            bool success = LoginInstance.ChangePassword(item);

            if (success)
            {
                return(Json(new { success = true, message = "Password Successfully Changed" }));
            }
            else
            {
                return(Json(new { success = true, message = "Password Change Failed" }));
            }
        }