diff --git a/lam/HISTORY b/lam/HISTORY index 8b695a63..34905d2c 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,4 +1,10 @@ -04.07.2006 1.0.3 +??? 1.0.4 + - added Russian translation + - inetLocalMailRecipient: print warning if local address is already in use + - fixed bugs: + + +05.07.2006 1.0.3 - fixed bugs: -> Kolab: fixed problem with message about missing password -> Unix groups: fixed auto GID diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index ee632d6c..b019b83f 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -221,6 +221,16 @@ class inetLocalMailRecipient extends baseModule { if (isset($post['localAdr']) && ($post['localAdr'] != "")) { // 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['localAdr'][] = array('WARN', _('This mail address is already in use:') . " " . $post['localAdr'], $keys[$i]); + break; + } + } $this->attributes['mailLocalAddress'][] = $post['localAdr']; } else {