public static CurrentUser LoadUser(string id) { CurrentUser currentUser = new CurrentUser(); currentUser.User = UserReader.GetUserById(id); return currentUser; }
public static CurrentUser LoadUser(string login, string password) { CurrentUser currentUser = new CurrentUser(); currentUser.User = UserReader.GetUserByLogin(login); if (!currentUser.User.CheckPassword(password)) throw new Exception("Password authentication failed!"); return currentUser; }