fix for bug #518:

This commit is contained in:
Ralf Becker 2007-05-08 11:44:43 +00:00
parent 1e0f7c71e8
commit a33f2ab12c
2 changed files with 6 additions and 6 deletions

View File

@ -136,7 +136,7 @@
if(!isset($this->ldapServerInfo[$host])) {
//error_log("no ldap server info found");
$ldapbind = ldap_bind($this->ds, $GLOBALS['egw_info']['server']['ldap_root_dn'], $GLOBALS['egw_info']['server']['ldap_root_pw']);
$ldapbind = @ldap_bind($this->ds, $GLOBALS['egw_info']['server']['ldap_root_dn'], $GLOBALS['egw_info']['server']['ldap_root_pw']);
$filter='(objectclass=*)';
$justthese = array('structuralObjectClass','namingContexts','supportedLDAPVersion','subschemaSubentry');
@ -208,14 +208,13 @@
$ldapServerInfo = $this->ldapServerInfo[$host];
}
if(!ldap_bind($this->ds, $dn, $passwd)) {
if(!@ldap_bind($this->ds, $dn, $passwd)) {
if(is_object($GLOBALS['egw']->log)) {
$GLOBALS['egw']->log->message('F-Abort, Failed binding to LDAP server');
$GLOBALS['egw']->log->commit();
}
printf("<b>Error: Can't bind to LDAP server: %s!</b><br>",$dn);
echo function_backtrace(1);
printf("<b>Error: Can't bind to LDAP server: %s!</b> %s<br />",$dn,function_backtrace(1));
return False;
}

View File

@ -883,9 +883,10 @@
!$GLOBALS['egw']->accounts->ds)
{
printf("<b>Error: Error connecting to LDAP server %s!</b><br>",$GLOBALS['egw_info']['server']['ldap_host']);
exit;
return false;
}
}
return true;
}
/**
@ -966,7 +967,7 @@
*/
function accounts_exist()
{
$this->setup_account_object();
if (!$this->setup_account_object()) return false;
$accounts = $GLOBALS['egw']->accounts->search(array(
'type' => 'accounts',