do not use cache

This commit is contained in:
Roland Gruber 2010-08-05 20:42:39 +00:00
parent 03d4b9975c
commit 2bd24982a3
2 changed files with 7 additions and 11 deletions

View File

@ -227,14 +227,9 @@ class inetLocalMailRecipient extends baseModule {
// check if address has correct format
if (get_preg($_POST['localAdr'], 'mailLocalAddress')) {
// check if new address is not already in database
$data = $_SESSION['cache']->get_cache('mailLocalAddress', 'inetLocalMailRecipient', 'user');
$keys = array_keys($data);
for ($i = 0; $i < sizeof($keys); $i++) {
$adrList = $data[$keys[$i]];
if (in_array_ignore_case($_POST['localAdr'], $adrList)) {
$errors[] = array('WARN', _('This mail address is already in use:') . " " . $_POST['localAdr'], $keys[$i]);
break;
}
$data = searchLDAPByAttribute('mailLocalAddress', $_POST['localAdr'], 'inetLocalMailRecipient', array('dn'), array('user'));
if (sizeof($data) > 0) {
$errors[] = array('WARN', _('This mail address is already in use:') . " " . $_POST['localAdr'], $data[0]['dn']);
}
$this->attributes['mailLocalAddress'][] = $_POST['localAdr'];
}

View File

@ -940,9 +940,10 @@ class inetOrgPerson extends baseModule implements passwordService {
}
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideManager')) {
// get list of existing users for manager attribute
$dnUsers = $_SESSION['cache']->get_cache('uid', 'inetOrgPerson', 'user');
if (!is_array($dnUsers)) $dnUsers = array();
$dnUsers = array_keys($dnUsers);
$dnUsers = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('dn'), array('user'));
for ($i = 0; $i < sizeof($dnUsers); $i++) {
$dnUsers[$i] = $dnUsers[$i]['dn'];
}
usort($dnUsers, array($_SESSION['ldap'], 'cmp_array'));
array_unshift($dnUsers, '-');
$options = array();