mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +01:00
fixed not working ldap connection using php4-restore session-mode
This commit is contained in:
parent
6c6c2e21b8
commit
e9003d58f2
@ -215,6 +215,31 @@ class so_ldap
|
|||||||
$this->personalContactsDN = 'ou=personal,ou=contacts,'. $GLOBALS['egw_info']['server']['ldap_contact_context'];
|
$this->personalContactsDN = 'ou=personal,ou=contacts,'. $GLOBALS['egw_info']['server']['ldap_contact_context'];
|
||||||
$this->sharedContactsDN = 'ou=shared,ou=contacts,'. $GLOBALS['egw_info']['server']['ldap_contact_context'];
|
$this->sharedContactsDN = 'ou=shared,ou=contacts,'. $GLOBALS['egw_info']['server']['ldap_contact_context'];
|
||||||
|
|
||||||
|
$this->connect();
|
||||||
|
$this->ldapServerInfo = $GLOBALS['egw']->ldap->getLDAPServerInfo($GLOBALS['egw_info']['server']['ldap_contact_host']);
|
||||||
|
|
||||||
|
foreach($this->schema2egw as $schema => $attributes)
|
||||||
|
{
|
||||||
|
$this->all_attributes = array_merge($this->all_attributes,array_values($attributes));
|
||||||
|
}
|
||||||
|
$this->all_attributes = array_values(array_unique($this->all_attributes));
|
||||||
|
|
||||||
|
$this->charset = $GLOBALS['egw']->translation->charset();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __wakeup function gets called by php while unserializing the object to reconnect with the ldap server
|
||||||
|
*/
|
||||||
|
function __wakeup()
|
||||||
|
{
|
||||||
|
$this->connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* connect to LDAP server
|
||||||
|
*/
|
||||||
|
function connect()
|
||||||
|
{
|
||||||
if (!is_object($GLOBALS['egw']->ldap))
|
if (!is_object($GLOBALS['egw']->ldap))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
|
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
|
||||||
@ -234,16 +259,6 @@ class so_ldap
|
|||||||
$GLOBALS['egw_info']['user']['passwd']
|
$GLOBALS['egw_info']['user']['passwd']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$this->ldapServerInfo = $GLOBALS['egw']->ldap->getLDAPServerInfo($GLOBALS['egw_info']['server']['ldap_contact_host']);
|
|
||||||
|
|
||||||
foreach($this->schema2egw as $schema => $attributes)
|
|
||||||
{
|
|
||||||
$this->all_attributes = array_merge($this->all_attributes,array_values($attributes));
|
|
||||||
}
|
|
||||||
$this->all_attributes = array_values(array_unique($this->all_attributes));
|
|
||||||
|
|
||||||
$this->charset = $GLOBALS['egw']->translation->charset();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the supported fields of this LDAP server (based on the objectclasses it supports)
|
* Returns the supported fields of this LDAP server (based on the objectclasses it supports)
|
||||||
|
Loading…
Reference in New Issue
Block a user