//[RequireHttps]


        public HttpResponseMessage Post([FromBody] user details)
        {
            var q = UserLogin.ChangePassword(details.username, details.password);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, q);

            return(response);
        }
예제 #2
0
        public ActionResult ChangePassword(int idUser)
        {
            var       strRes = "";
            UserLogin Login  = new UserLogin();

            strRes = Login.ChangePassword(idUser);
            return(Content(strRes));
        }
예제 #3
0
        public ActionResult ChangePassword(UserViewModel userModel)
        {
            userModel.UserName = Convert.ToString(Session["UserName"]);
            userModel.UserType = (UserType)Enum.Parse(typeof(UserType), Convert.ToString(Session["UserType"]));

            var userLogin = new UserLogin();
            var user      = new User();

            user.UserName = userModel.UserName;
            user.Password = userModel.ConfirmPassword;
            user.UserType = userModel.UserType;

            var isPasswordChanged = userLogin.ChangePassword(user);

            ViewBag.IsPasswordChanged = true;
            return(View());
        }