mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +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->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))
|
||||
{
|
||||
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
|
||||
@ -232,17 +257,7 @@ class so_ldap
|
||||
$GLOBALS['egw_info']['server']['ldap_contact_host'],
|
||||
$GLOBALS['egw_info']['user']['account_dn'],
|
||||
$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();
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user