public void deleteUserByName(final String name) {
        User userToDelete = null;
        for (User u : userList.getUserList()) {
            if (name.equals(u.getName())) {
                userToDelete = u;
            }
        }
        if (userToDelete != null) {
            userList.getUserList().remove(userToDelete);

        }

        writeUserList();

    }