summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Ã…kre Solberg <andreas.solberg@uninett.no>2008-03-12 12:08:17 +0000
committerAndreas Ã…kre Solberg <andreas.solberg@uninett.no>2008-03-12 12:08:17 +0000
commitd06d8b48aa5d459ca77b0cdaec89a0bd3e2c0728 (patch)
treed55a87011b65f51fef54bcea4ceaca05df18474c
parent285bfee0a54a0ba1922d4d6864aa47418e6110b5 (diff)
downloadsimplesamlphp-d06d8b48aa5d459ca77b0cdaec89a0bd3e2c0728.zip
simplesamlphp-d06d8b48aa5d459ca77b0cdaec89a0bd3e2c0728.tar.gz
simplesamlphp-d06d8b48aa5d459ca77b0cdaec89a0bd3e2c0728.tar.bz2
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
-rw-r--r--lib/SimpleSAML/Auth/LDAP.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php
index d9a0cb7..1167419 100644
--- a/lib/SimpleSAML/Auth/LDAP.php
+++ b/lib/SimpleSAML/Auth/LDAP.php
@@ -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');
}
}