ldap: auth containers are not appended to base dn

Still need to fix the help text in the server settings.
This commit is contained in:
Franco Fichtner 2016-11-29 18:36:09 +01:00
parent d870e03d95
commit ae4e38bcb3

View File

@ -126,22 +126,9 @@ class LDAP implements IAuthConnector
{
$result = false;
if ($this->ldapHandle != null) {
$searchpaths = array();
$searchpaths = array($this->baseSearchDN);
if (!empty($this->ldapAuthcontainers)) {
/* prepend each authentication container */
foreach (explode(';', $this->ldapAuthcontainers) as $container) {
$searchpath = array();
if (!empty($container)) {
$searchpath[] = $container;
}
if (!empty($this->baseSearchDN)) {
$searchpath[] = $this->baseSearchDN;
}
$searchpaths[] = implode(',', $searchpath);
}
} else {
/* use a single base DN */
$searchpaths[] = $this->baseSearchDN;
$searchpaths = explode(';', $this->ldapAuthcontainers);
}
foreach ($searchpaths as $baseDN) {
if ($this->ldapScope == 'one') {