]> BookStack Code Mirror - bookstack/blobdiff - app/Services/Ldap.php
Updated issue template and added TinyMCE autolinking
[bookstack] / app / Services / Ldap.php
index cfefbb4b6a1b6065f92f208c6b64b636fd4f6008..9c3bec3270af2f4321d155f7a980fca9a7d12839 100644 (file)
@@ -33,6 +33,17 @@ class Ldap
         return ldap_set_option($ldapConnection, $option, $value);
     }
 
+    /**
+     * Set the version number for the given ldap connection.
+     * @param $ldapConnection
+     * @param $version
+     * @return bool
+     */
+    public function setVersion($ldapConnection, $version)
+    {
+        return $this->setOption($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, $version);
+    }
+
     /**
      * Search LDAP tree using the provided filter.
      * @param resource   $ldapConnection
@@ -83,4 +94,4 @@ class Ldap
         return ldap_bind($ldapConnection, $bindRdn, $bindPassword);
     }
 
-}
\ No newline at end of file
+}