public static boolean checkIfUsernameExists(String username, List<Person> persons, Person thisPerson) { for (Person person : persons) { if (!person.equals(thisPerson) && username.equals(person.getUsername())) {
public static boolean checkIfUsernameExists(String username, Person thisPerson) { for (Login login : Identification.readAllLogins()) { if (username.equalsIgnoreCase(login.getUsername())) {
    public static boolean checkIfUsernameExists(String username, List<Person> persons, Person thisPerson) {        for (Person person : persons) {            if (!person.equals(thisPerson) && username.equals(person.getUsername())) {                return true;            }        }        return false;    }