From bdb423d0d37d87a52309c91562fe8f6773f68ea1 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 28 Aug 2009 16:31:19 +1000 Subject: [PATCH] SF Bug #2844186 - fail to add and edit entries (delete work fine) --- lib/ds_ldap.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 2d594d5..f2abc16 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -270,7 +270,7 @@ class ldap extends DS { } else { $userDN = $this->getLogin('user'); - $pass = $this->getLogin('user'); + $pass = $this->getPassword('user'); } } @@ -557,8 +557,16 @@ class ldap extends DS { if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs); - if (! $this->getValue('server','tls') || (function_exists('ldap_start_tls') && ! ldap_start_tls($resource))) - error(_('Could not start TLS. Please check your LDAP server configuration.'),'error',null,true); + if (! $this->getValue('server','tls') || (function_exists('ldap_start_tls') && ! @ldap_start_tls($resource))) { + system_message(array( + 'title'=>sprintf('%s (%s)',_('Could not start TLS.'),$this->getName()), + 'body'=>sprintf('%s: %s',_('Error'),_('Could not start TLS. Please check your LDAP server configuration.')), + 'type'=>'error')); + + return false; + + } else + return true; } /**