show some internal attributes on 389 server

This commit is contained in:
Roland Gruber 2011-10-12 17:38:27 +00:00
parent 94759592a8
commit 84d74d8577
2 changed files with 5 additions and 1 deletions

View File

@ -1366,7 +1366,9 @@ class accountContainer {
$this->module = array(); $this->module = array();
$modules = $_SESSION['config']->get_AccountModules($this->type); $modules = $_SESSION['config']->get_AccountModules($this->type);
$search = substr($dn, 0, strpos($dn, ',')); $search = substr($dn, 0, strpos($dn, ','));
$result = @ldap_read($_SESSION['ldap']->server(), escapeDN($dn), escapeDN($search), array('*', '+'), 0, 0, 0, LDAP_DEREF_NEVER); $searchAttrs = array('*', '+', 'creatorsName', 'createTimestamp', 'modifiersName',
'modifyTimestamp', 'hasSubordinates', 'pwdChangedTime');
$result = @ldap_read($_SESSION['ldap']->server(), escapeDN($dn), escapeDN($search), $searchAttrs, 0, 0, 0, LDAP_DEREF_NEVER);
if (!$result) { if (!$result) {
return array(array("ERROR", _("Unable to load LDAP entry:") . " " . htmlspecialchars($dn), ldap_error($_SESSION['ldap']->server()))); return array(array("ERROR", _("Unable to load LDAP entry:") . " " . htmlspecialchars($dn), ldap_error($_SESSION['ldap']->server())));
} }

View File

@ -68,4 +68,6 @@ if (!checkIfWriteAccessIsAllowed()) {
$servers->setValue('server','read_only',true); $servers->setValue('server','read_only',true);
} }
$servers->setValue('unique','attrs',array()); $servers->setValue('unique','attrs',array());
$servers->setValue('server','custom_sys_attrs', array('creatorsName', 'createTimestamp', 'modifiersName',
'modifyTimestamp', 'hasSubordinates', 'pwdChangedTime'));
?> ?>