mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-06 03:49:56 +02:00
do not use cache
This commit is contained in:
parent
03d4b9975c
commit
2bd24982a3
2 changed files with 7 additions and 11 deletions
|
@ -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'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue