summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-26 13:49:55 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-27 18:21:15 (GMT)
commitdb839380bd42cacb522e288e596720c9a77edaeb (patch)
treea5987c7c652d9693b00ca14edd9a5afcda31f8ee
parentb7f17aafaffa9d2976eafb3314366489bcc2ae40 (diff)
downloadkolab-wap-db839380bd42cacb522e288e596720c9a77edaeb.tar.gz
Deduplicate secondary recipient email addresses that are already the primary mail address
-rw-r--r--lib/api/kolab_api_service_form_value.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 1a1a469..b9fd055 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -737,6 +737,12 @@ class kolab_api_service_form_value extends kolab_api_service
}
+ if (in_array($postdata['mail'], $secondary_mail_addresses)) {
+ Log::trace("Found primary mail as part of the secondary mail addresses");
+
+ unset($secondary_mail_addresses[array_search($postdata['mail'], $secondary_mail_addresses)]);
+ }
+
return $secondary_mail_addresses;
}
}