mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 01:18:42 +01:00
fix for bug #518:
This commit is contained in:
parent
1e0f7c71e8
commit
a33f2ab12c
@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
if(!isset($this->ldapServerInfo[$host])) {
|
if(!isset($this->ldapServerInfo[$host])) {
|
||||||
//error_log("no ldap server info found");
|
//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=*)';
|
$filter='(objectclass=*)';
|
||||||
$justthese = array('structuralObjectClass','namingContexts','supportedLDAPVersion','subschemaSubentry');
|
$justthese = array('structuralObjectClass','namingContexts','supportedLDAPVersion','subschemaSubentry');
|
||||||
@ -208,14 +208,13 @@
|
|||||||
$ldapServerInfo = $this->ldapServerInfo[$host];
|
$ldapServerInfo = $this->ldapServerInfo[$host];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ldap_bind($this->ds, $dn, $passwd)) {
|
if(!@ldap_bind($this->ds, $dn, $passwd)) {
|
||||||
if(is_object($GLOBALS['egw']->log)) {
|
if(is_object($GLOBALS['egw']->log)) {
|
||||||
$GLOBALS['egw']->log->message('F-Abort, Failed binding to LDAP server');
|
$GLOBALS['egw']->log->message('F-Abort, Failed binding to LDAP server');
|
||||||
$GLOBALS['egw']->log->commit();
|
$GLOBALS['egw']->log->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("<b>Error: Can't bind to LDAP server: %s!</b><br>",$dn);
|
printf("<b>Error: Can't bind to LDAP server: %s!</b> %s<br />",$dn,function_backtrace(1));
|
||||||
echo function_backtrace(1);
|
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,9 +883,10 @@
|
|||||||
!$GLOBALS['egw']->accounts->ds)
|
!$GLOBALS['egw']->accounts->ds)
|
||||||
{
|
{
|
||||||
printf("<b>Error: Error connecting to LDAP server %s!</b><br>",$GLOBALS['egw_info']['server']['ldap_host']);
|
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()
|
function accounts_exist()
|
||||||
{
|
{
|
||||||
$this->setup_account_object();
|
if (!$this->setup_account_object()) return false;
|
||||||
|
|
||||||
$accounts = $GLOBALS['egw']->accounts->search(array(
|
$accounts = $GLOBALS['egw']->accounts->search(array(
|
||||||
'type' => 'accounts',
|
'type' => 'accounts',
|
||||||
|
Loading…
Reference in New Issue
Block a user