diff --git a/modules/ldap/lib/ConfigHelper.php b/modules/ldap/lib/ConfigHelper.php
index 28e4151eefa55e9cd44998c1069b5908c8bdccd6..032d5ca5ce42bd256cb474b782c7ccb660fbbf2b 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)