Skip to content
Snippets Groups Projects
Commit d06d8b48 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Added debug line, and removed warnings with start ldap tls

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@399 44740490-163a-0410-bde0-09ae8108e29a
parent 285bfee0
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ require_once((isset($SIMPLESAML_INCPREFIX)?$SIMPLESAML_INCPREFIX:'') . 'SimpleSA
/**
* The LDAP class holds helper functions to access an LDAP database.
*
* @author Andreas kre Solberg, UNINETT AS. <andreas.solberg@uninett.no>
* @author Andreas Aakre Solberg, UNINETT AS. <andreas.solberg@uninett.no>
* @author Anders Lund, UNINETT AS. <anders.lund@uninett.no>
* @package simpleSAMLphp
* @version $Id: Session.php 244 2008-02-04 08:36:24Z andreassolberg $
......@@ -23,7 +23,9 @@ class SimpleSAML_Auth_LDAP {
/**
* private constructor restricts instantiaton to getInstance()
*/
public function __construct($hostname, $enable_tls=true) {
public function __construct($hostname, $enable_tls = true) {
SimpleSAML_Logger::debug('Library - LDAP __construct(): Setup LDAP with host [' . $hostname . '] and tls [' . var_export($enable_tls, true) . ']');
$this->ldap = @ldap_connect($hostname);
if (empty($this->ldap))
......@@ -32,7 +34,7 @@ class SimpleSAML_Auth_LDAP {
$this->setV3();
if ($enable_tls) {
if (!ldap_start_tls($this->ldap)) {
if (!@ldap_start_tls($this->ldap)) {
throw new Exception('Could not force LDAP into TLS-session. Please verify certificates and configuration');
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment