OF-1106: Allow for multiple namefields.
This commit allows one to configure more than one LDAP attribute to be used for the Name field, where the first non-empty attribute is used (note that this is different from combining multiple attribute values, which was already supported).
The new functionality is used by defining the mapping value as follows:
(|({givenName})({displayName})({cn}))
In the example above, the attribute used will be the first non-empty attribute value from the list:
- givenName
- displayName
- cn
Obviously, other attribute names can be used. It's also possible to use fewer or more fields.
This particular format (which mimics LDAP filter syntax) was used to avoid clashes with mappings where it is desirable to join multiple fields (which is also supported in Openfire), for example:
OF-1944: Clear caches after changing LDAP settings.
When LDAP profile settings are changed (for example, to change the VCard mapping), then old data can still linger in the caches. To the unexpected user, it'll appear as if changes have not been applied.
To help changes be effectuated immediately, relevant caches should be cleared after updating the LDAP profile settings.