Example #1
0
        public JsonResult updatePwd(string userAccount, string userPassword)
        {
            string pwd = FormsAuthentication.HashPasswordForStoringInConfigFile(userPassword, "md5");
            int    ret = webUserservice.UpdateWebUserPassword(userAccount, pwd);

            return(Json(new { RetCode = ret }));
        }
Example #2
0
        public int UpdateUserPassword(string userAccount, string OriginPwd, string userPassword)
        {
            string oldpwd  = FormsAuthentication.HashPasswordForStoringInConfigFile(OriginPwd, "md5");
            string userpwd = FormsAuthentication.HashPasswordForStoringInConfigFile(userPassword, "md5");
            bool   bit     = webUserservice.ExistUser(userAccount, oldpwd);

            if (bit)
            {
                webUserservice.UpdateWebUserPassword(userAccount, userpwd);
                return(1);
            }
            else
            {
                //旧密码错误
                return(0);
            }
        }