Esempio n. 1
0
        public User Login(string username, string password)
        {
            string userID = dbUser.Authenticate(username, password).ToString();
            User   user   = GetUser(userID, FindUserBy.userID);

            return(user);
        }
Esempio n. 2
0
 /// <summary>
 /// checks if user login info is correct
 /// </summary>
 /// <param name="username">username of user</param>
 /// <param name="password">password of user</param>
 /// <returns>User object, that is null if authentication didn't work</returns>
 public static User AuthUser(string username, string password)
 {
     return(DbUser.Authenticate(username, password) ? new User(DbUser.GetUserByName(username)) : null);
 }