Exclude blank LDAP attributes

Asking for '' attributes is an error for some LDAP servers.
This commit is contained in:
Anthony Winstanley 2020-11-12 09:34:28 -08:00 committed by GitHub
parent c8d588871c
commit cc79bb1449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -398,7 +398,7 @@ class LdapAd extends LdapAdConfiguration
{
/** @var Schema $schema */
$schema = new $this->ldapConfig['schema'];
return [
return array_values(array_filter([
$this->ldapSettings['ldap_username_field'],
$this->ldapSettings['ldap_fname_field'],
$this->ldapSettings['ldap_lname_field'],
@ -409,7 +409,7 @@ class LdapAd extends LdapAdConfiguration
$schema->userAccountControl(),
$schema->title(),
$schema->telephone(),
];
]));
}
/**