示例#1
0
        public User Login(string userName, string password)
        {
            DataBaseAccess dal  = new DataBaseAccess();
            User           user = dal.GetUser(userName);

            if (user != null)
            {
                Security secure = new Security();
                if (secure.VerifyHash(password, user.pass))
                {
                    return(user);
                }
            }
            return(null);
        }