mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
Exclude blank LDAP attributes
Asking for '' attributes is an error for some LDAP servers.
This commit is contained in:
parent
c8d588871c
commit
cc79bb1449
|
@ -398,7 +398,7 @@ class LdapAd extends LdapAdConfiguration
|
||||||
{
|
{
|
||||||
/** @var Schema $schema */
|
/** @var Schema $schema */
|
||||||
$schema = new $this->ldapConfig['schema'];
|
$schema = new $this->ldapConfig['schema'];
|
||||||
return [
|
return array_values(array_filter([
|
||||||
$this->ldapSettings['ldap_username_field'],
|
$this->ldapSettings['ldap_username_field'],
|
||||||
$this->ldapSettings['ldap_fname_field'],
|
$this->ldapSettings['ldap_fname_field'],
|
||||||
$this->ldapSettings['ldap_lname_field'],
|
$this->ldapSettings['ldap_lname_field'],
|
||||||
|
@ -409,7 +409,7 @@ class LdapAd extends LdapAdConfiguration
|
||||||
$schema->userAccountControl(),
|
$schema->userAccountControl(),
|
||||||
$schema->title(),
|
$schema->title(),
|
||||||
$schema->telephone(),
|
$schema->telephone(),
|
||||||
];
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue