/[drupal]/contributions/modules/ldap_integration/ldap_integration/LDAPInterface.php
ViewVC logotype

Diff of /contributions/modules/ldap_integration/ldap_integration/LDAPInterface.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.6.2.3, Thu Apr 17 04:32:13 2008 UTC revision 1.2.2.6.2.4, Tue Oct 27 14:31:06 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: LDAPInterface.php,v 1.10 2007/08/23 00:05:42 kreaper Exp $  // $Id: LDAPInterface.php,v 1.2.2.6.2.3 2008/04/17 04:32:13 scafmac Exp $
3    
4  class LDAPInterface {  class LDAPInterface {
5    
# Line 106  class LDAPInterface { Line 106  class LDAPInterface {
106    
107    function initConnection() {    function initConnection() {
108      if (!$con = ldap_connect($this->server, $this->port)) {      if (!$con = ldap_connect($this->server, $this->port)) {
109        watchdog('user', 'LDAP Connect failure to ' . $this->server . ':' . $this->port);        watchdog('user', t('LDAP Connect failure to @server:@port.', array('@server' => $this->server, '@port' => $this->port)));
110        return NULL;        return NULL;
111      }      }
112    
# Line 117  class LDAPInterface { Line 117  class LDAPInterface {
117      if ($this->tls) {      if ($this->tls) {
118        $vers = $this->getOption('version');        $vers = $this->getOption('version');
119        if ($vers == -1) {        if ($vers == -1) {
120          watchdog('user', 'Could not get LDAP protocol version.');          watchdog('user', t('Could not get LDAP protocol version.'));
121        }        }
   
122        if ($vers != 3) {        if ($vers != 3) {
123          watchdog('user', 'Could not start TLS, only supported by LDAP v3.');          watchdog('user', t('Could not start TLS, only supported by LDAP v3.'));
124        }        }
125        else if (!function_exists('ldap_start_tls')) {        else if (!function_exists('ldap_start_tls')) {
126          watchdog('user', 'Could not start TLS. It does not seem to be supported by this PHP setup.');          watchdog('user', t('Could not start TLS. It does not seem to be supported by this PHP setup.'));
127        }        }
128        else if (!ldap_start_tls($con)) {        else if (!ldap_start_tls($con)) {
129          watchdog('user', t("Could not start TLS. (Error %errno: %error).", array('%errno' => ldap_errno($con), '%error' => ldap_error($con))));          watchdog('user', t("Could not start TLS. (Error %errno: %error).", array('%errno' => ldap_errno($con), '%error' => ldap_error($con))));

Legend:
Removed from v.1.2.2.6.2.3  
changed lines
  Added in v.1.2.2.6.2.4

  ViewVC Help
Powered by ViewVC 1.1.2