Exemplo n.º 1
0
        /// <summary>
        /// 密码是否正确
        /// </summary>
        /// <param name="password"></param>
        /// <returns></returns>
        public JsonResult ChkPassword(string password)
        {
            bool ismatch = false;

            if (!string.IsNullOrWhiteSpace(password))
            {
                var curUserId = UserHelper.GetCurrentUser().Id;
                var user      = UserService.GetUser(curUserId);
                ismatch = MyRequest.Md5(password) == user.Password ? true : false;
            }
            return(Json(ismatch, JsonRequestBehavior.AllowGet));
        }