Skip to content

Commit 88ab2b9

Browse files
author
Robin Kluth
committed
* fix: Multi-Domain search fixed
1 parent 91095dd commit 88ab2b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/LdapAuth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ public function searchUser(?string $searchFor, ?array $attributes = [], ?string
459459
}
460460

461461
$searchFilter = str_replace(["%searchFor%", "%onlyActive%"], [addslashes($searchFor), $onlyActive], $searchFilter);
462-
$baseDN = $baseDN ?: $this->_ldapBaseDn;
462+
$_baseDN = $baseDN ?: $this->_ldapBaseDn;
463463

464-
Yii::debug('Search-Filter: ' . $searchFilter . " | BaseDN: " . $baseDN, __METHOD__);
464+
Yii::debug('Search-Filter: ' . $searchFilter . " | BaseDN: " . $_baseDN, __METHOD__);
465465

466466
$result = ldap_read($this->_l, '', '(objectClass=*)', ['supportedControl']);
467467
$supControls = ldap_get_entries($this->_l, $result);
@@ -514,7 +514,7 @@ public function searchUser(?string $searchFor, ?array $attributes = [], ?string
514514
}
515515

516516
do {
517-
$result = @ldap_search($this->_l, $baseDN, $searchFilter, $attributes, 0, -1, -1, LDAP_DEREF_NEVER, $requestControls);
517+
$result = @ldap_search($this->_l, $_baseDN, $searchFilter, $attributes, 0, -1, -1, LDAP_DEREF_NEVER, $requestControls);
518518
if (!$result) {
519519
// Something is wrong with the search query
520520
if (is_null($this->_l)) {

0 commit comments

Comments
 (0)