コード例 #1
0
        private static bool CheckCredential(string username, string password, out string userid)
        {
            // 用户名和密码验证
            var user = SysUserService.Get(username, Commons.HashString(password));

            if (user != null)
            {
                userid = user.Id + "";
                return(true);
            }
            else
            {
                userid = "";
                return(false);
            }
        }