Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 4cb8850

Browse files
authored
Fix counting user on ldap
Following d43cab3 Counting on "/" should return the total number in ldap
1 parent cec749a commit 4cb8850

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/plugins/auth.ldap/LdapAuthDriver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,7 @@ public function getUsersCount($baseGroup = "/", $regexp = "", $filterProperty =
477477
}
478478

479479
if (!empty($this->hasGroupsMapping)) {
480-
if ($baseGroup == "/") {
481-
$this->dynamicFilter = "!(" . $this->hasGroupsMapping . "=*)";
482-
} else {
480+
if ($baseGroup !== "/")
483481
$this->dynamicFilter = $this->hasGroupsMapping . "=" . basename($baseGroup);
484482
}
485483
}
@@ -1100,4 +1098,4 @@ public function sanitize($s, $level = InputFilter::SANITIZE_HTML)
11001098
$newS = preg_replace($preg, '_', $s);
11011099
return $newS;
11021100
}
1103-
}
1101+
}

0 commit comments

Comments
 (0)