Exemple #1
0
 public static bool TrySignup(string login, string email, string password)
 {
     if (DBContextManager.CreateUser(login, email, password))
     {
         TryLogin(login, password);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
        public static bool TryLogin(string login, string password)
        {
            User u = DBContextManager.TryLogin(login, password);

            if (u != null)
            {
                _currentUser = u;
                return(true);
            }
            else
            {
                return(false);
            }
        }