summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39419d8)
raw | patch | inline | side by side (parent: 39419d8)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Dec 2009 14:39:28 +0000 (14:39 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Dec 2009 14:39:28 +0000 (14:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14861 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/mail/admin/groups/mail/class_groupMail.inc | patch | blob | history |
diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc
index a456ea1fc731444ca52328d3aff6892e98059e01..0f898504f9e2b13fbe6dd6ad0a53fc8f697cdd0f 100644 (file)
}
if ($valid && ($user= $this->addAlternate ($_POST['alternate_address'])) != ""){
$ui= get_userinfo();
- if ($user != $ui->username){
- msg_dialog::display(_("Error"), msgPool::duplicated(_("Mail address"))." ".
- sprintf(_("Address is already in use by user '%s'."), $user), ERROR_DIALOG);
+ $addon= "";
+ if ($user[0] == "!") {
+ $addon= sprintf(_("Address is already in use by group '%s'."), mb_substr($user, 1));
+ } else {
+ $addon= sprintf(_("Address is already in use by user '%s'."), $user);
}
+ msg_dialog::display(_("Error"), msgPool::duplicated(_("Mail address"))."<br><br><i>".
+ "$addon</i>", ERROR_DIALOG);
}
}
if (isset($_POST['delete_alternate']) && isset($_POST['alternates_list'])){
/* Is this address already assigned in LDAP? */
$ldap->cd ($this->config->current['BASE']);
$ldap->search ("(&(objectClass=gosaMailAccount)(|(mail=$address)".
- "(gosaMailAlternateAddress=$address)))");
+ "(gosaMailAlternateAddress=$address)))", array("cn", "uid"));
if ($ldap->count() > 0){
$attrs= $ldap->fetch ();
+ if (!isset($attrs["uid"])) {
+ return ("!".$attrs["cn"][0]);
+ }
return ($attrs["uid"][0]);
}