]> BookStack Code Mirror - bookstack/blobdiff - app/Services/Ldap.php
Updated 'Spanish Argentina' translation.
[bookstack] / app / Services / Ldap.php
index cfefbb4b6a1b6065f92f208c6b64b636fd4f6008..29270daf5620d169a096fda4516525923e3dde9d 100644 (file)
@@ -1,6 +1,5 @@
 <?php namespace BookStack\Services;
 
-
 /**
  * Class Ldap
  * An object-orientated thin abstraction wrapper for common PHP LDAP functions.
@@ -33,6 +32,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
@@ -82,5 +92,4 @@ class Ldap
     {
         return ldap_bind($ldapConnection, $bindRdn, $bindPassword);
     }
-
-}
\ No newline at end of file
+}