8182838485868788899091
public UserProfile authenticate( String username, String password ) { UserProfile profile = getUser(username); if( profile != null) { if( profile.authenticate( password ) ) return profile; } return null; }