summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-05-02 14:12:04 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-05-02 14:12:04 +0200
commitb13c741cb3471f4f2df579b81e0bb5ebe56fff95 (patch)
tree9b6c10cc9a61c4dcd3db7f643239eac9722ccb5c /lib
parent94c2f12226ed005fc2a1e9c440ec70346e9c272a (diff)
downloadnextcloud-server-b13c741cb3471f4f2df579b81e0bb5ebe56fff95.tar.gz
nextcloud-server-b13c741cb3471f4f2df579b81e0bb5ebe56fff95.zip
Do not show an email action for contacts with emtpy email addresses
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
index d5630e6420d..242fbd06a22 100644
--- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
+++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php
@@ -52,6 +52,10 @@ class EMailProvider implements IProvider {
public function process(IEntry $entry) {
$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg'));
foreach ($entry->getEMailAddresses() as $address) {
+ if (empty($address)) {
+ // Skip
+ continue;
+ }
$action = $this->actionFactory->newEMailAction($iconUrl, $address, $address);
$entry->addAction($action);
}