Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -163,7 +163,10 @@ |
164 | 164 | //TLS needs to be started after the connection is made |
165 | 165 | if ( $encryptionType == "tls" ) { |
166 | 166 | $this->printDebug("Using TLS",2); |
167 | | - ldap_start_tls($ldapconn); |
| 167 | + if ( !ldap_start_tls( $ldapconn ) ) { |
| 168 | + $this->printDebug("Failed to start TLS.",2); |
| 169 | + return; |
| 170 | + } |
168 | 171 | } |
169 | 172 | |
170 | 173 | return $ldapconn; |