Browse Source

Error with query construction, missing "( )"

error when the user search string in auth.conf.php

adding the extra "( )" englobes the full query and renders it correct as a LDAP filter.
StarbugStone 8 years ago
parent
commit
81a4c73484
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/auth/ldap/authldap.php

+ 1 - 1
main/auth/ldap/authldap.php

@@ -387,7 +387,7 @@ function ldap_get_users() {
         }
         $str_query.=" )";
     } else {
-        $str_query= count($ldap_query) > 0 ? $ldap_query[0] : null;
+        $str_query= count($ldap_query) > 0 ? "(".$ldap_query[0].")" : null;
     }
 
     $ds = ldap_connect($ldap_host, $ldap_port);