From 1db9543d36d8738f0ab4513cca359ee1e88c0764 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Fri, 4 Aug 2017 08:57:23 +0000
Subject: [PATCH] Additional filter options were not passed to LDAP search in
 seachfordn().

This would mean that any code using this helper function could not
use the ldap.filter option. It's a followup to commit
ff5497e9fdc7ca4d3c5395d15197ec1190ed5c11 which fixed this for the
`login()` method but not for the `searchfordn()` method.
---
 modules/ldap/lib/ConfigHelper.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/ldap/lib/ConfigHelper.php b/modules/ldap/lib/ConfigHelper.php
index 28e4151ee..032d5ca5c 100644
--- a/modules/ldap/lib/ConfigHelper.php
+++ b/modules/ldap/lib/ConfigHelper.php
@@ -275,7 +275,7 @@ class sspmod_ldap_ConfigHelper
         }
 
         return $ldap->searchfordn($this->searchBase, $attribute,
-            $value, $allowZeroHits);
+            $value, $allowZeroHits, $this->searchFilter);
     }
 
     public function getAttributes($dn, $attributes = null)
-- 
GitLab