apps/user_ldap/user_ldap.php: - Add support for ldapv3 and tls

This commit is contained in:
Sascha Schneider 2011-08-26 16:37:22 +02:00 committed by Dominik Schmidt
parent bcfdc12852
commit 04eebccc39
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ class OC_USER_LDAP extends OC_User_Backend {
private function getDs() {
if(!$this->ds) {
$this->ds = ldap_connect( $this->ldap_host, $this->ldap_port );
if(ldap_set_option($this->ds, LDAP_OPT_PROTOCOL_VERSION, 3))
if(ldap_set_option($this->ds, LDAP_OPT_REFERRALS, 0))
ldap_start_tls($this->ds);
}
// login