Example #1
0
        public static bool ValidateUser(string username, string password)
        {
            var user = UserDataProvider.GetByUsername(username);

            if (user == null || user.Password != password)
            {
                return(false);
            }
            CurrentUser = user;
            return(true);

            //return user != null && user.Password == password;
        }