public boolean isUserAdmin(JID jid, boolean allowAdminIfEmpty) {
        if (adminList == null) {
            loadAdminList();
        }
        if (allowAdminIfEmpty && adminList.isEmpty()) {
            return "admin".equals(jid.getNode());
        }
        JID bareJID = jid.asBareJID();
        return adminList.contains(bareJID);
    }
Returns true if the user is an admin.

@param jid JID of user to check whether they are an admin or not.
@param allowAdminIfEmpty Allows the "admin" user to log in if the adminList is empty.
@return True or false if user is an admin.
xmppserver/src/main/java/org/jivesoftware/openfire/admin/AdminManager.java