예제 #1
0
        public bool CheckLoginData(LoginData data)
        {
            var user = _repository.GetUserByUsername(data.Username);

            if (user != null)
            {
                if (user.Password == data.Password)
                {
                    return(true);
                }
            }
            return(false);
        }
예제 #2
0
 public bool CheckUsername(string username, int length)
 {
     if (CheckEntryLength(username, length))
     {
         var user = _repository.GetUserByUsername(username);
         return(user == null);
     }
     _pageService.DisplayAlert("Invalid username data!", $"Please, check username data. Length should be less than {length}", "OK");
     return(false);
 }