public void setUsernameField(String usernameField) {
        this.usernameField = usernameField;
        if (usernameField == null) {
            properties.remove("ldap.usernameField");
            this.usernameField = "uid";
        }
        else {
            properties.put("ldap.usernameField", usernameField);
        }
    }
Sets the LDAP field name that the username lookup will be performed on.
By default this is "uid".

@param usernameField the LDAP field that the username lookup will be
     performed on.
xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapManager.java