Skip to content

Commit

Permalink
Ooops
Browse files Browse the repository at this point in the history
  • Loading branch information
robin.kluth committed Nov 22, 2021
1 parent f2e8531 commit 5460215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LdapAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public function searchUser(string $searchFor, $attributes = "", $searchFilter =
$searchFilter = "(&(objectCategory=person)" . $onlyActive . "(|(objectSid=%searchFor%)(sIDHistory=%searchFor%)(samaccountname=*%searchFor%*)(mail=*%searchFor%*)(sn=*%searchFor%*)(givenName=*%searchFor%*)(l=%searchFor%)(physicalDeliveryOfficeName=%searchFor%)))";
}

if (empty($searchFor) && strpos($searchFilter, '%searchFor%') === false) {
if (empty($searchFor) && strpos($searchFilter, '%searchFor%') !== false) {
throw new InvalidArgumentException("Search term is empty but the filter has a placeholder set! Set a term or set a new filter.");
}

Expand Down

0 comments on commit 5460215

Please sign in to comment.