Commit 5cde61131728d5319c8a832ddafe915f7b762a97
1 parent
3c096496
Correctly set the LDAP Protocol Version in the OpenLDAP2 case.
Reported by: Landon Fuller (landonf) SF Tracker: 1159535 git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3241 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
3 deletions
lib/authentication/class.AuthLdap.php
| @@ -129,9 +129,9 @@ class AuthLdap { | @@ -129,9 +129,9 @@ class AuthLdap { | ||
| 129 | function connect() { | 129 | function connect() { |
| 130 | foreach ($this->server as $key => $host) { | 130 | foreach ($this->server as $key => $host) { |
| 131 | $this->connection = ldap_connect( $host); | 131 | $this->connection = ldap_connect( $host); |
| 132 | - if ( $this->serverType == "OpenLDAP2" ) { | ||
| 133 | - ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); | ||
| 134 | - } | 132 | + if ( $this->serverType == "OpenLDAP2" ) { |
| 133 | + ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, 3); | ||
| 134 | + } | ||
| 135 | if ( $this->connection) { | 135 | if ( $this->connection) { |
| 136 | if (($this->serverType == "ActiveDirectory") || | 136 | if (($this->serverType == "ActiveDirectory") || |
| 137 | (($this->serverType == "OpenLDAP2") && | 137 | (($this->serverType == "OpenLDAP2") && |