From 54602152ccc3e514add6575a985753206a7b7fed Mon Sep 17 00:00:00 2001 From: "robin.kluth" Date: Mon, 22 Nov 2021 14:06:52 +0100 Subject: [PATCH] Ooops --- src/LdapAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LdapAuth.php b/src/LdapAuth.php index 58f39e0..462a4cb 100644 --- a/src/LdapAuth.php +++ b/src/LdapAuth.php @@ -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."); }