Suggest LDAP backend type based on the discovery (if any) (#2993)

fixes #2991
This commit is contained in:
Alexander Aleksandrovič Klimov 2017-10-06 11:23:07 +02:00 committed by Johannes Meyer
parent 8de0b80f9e
commit 2510155206
1 changed files with 2 additions and 0 deletions

View File

@ -46,12 +46,14 @@ class Discovery
{
if ($this->isAd()) {
return array(
'backend' => 'msldap',
'base_dn' => $this->connection->getCapabilities()->getDefaultNamingContext(),
'user_class' => 'user',
'user_name_attribute' => 'sAMAccountName'
);
} else {
return array(
'backend' => 'ldap',
'base_dn' => $this->connection->getCapabilities()->getDefaultNamingContext(),
'user_class' => 'inetOrgPerson',
'user_name_attribute' => 'uid'