X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0821672e70cf9eb81091032514634b299cc5900b..refs/pull/270/head:/app/Services/Ldap.php diff --git a/app/Services/Ldap.php b/app/Services/Ldap.php index cfefbb4b6..9c3bec327 100644 --- a/app/Services/Ldap.php +++ b/app/Services/Ldap.php @@ -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 +}