From db1f92c7f81f5aa99956fba851a9fbb96a1f92b2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 14 Nov 2016 13:41:21 +0100 Subject: [PATCH] fix identities from aliases or imap-user without @ shown with empty label, if name is empty --- api/src/Mail/Account.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index 01cf1f2a09..a67a72e2d7 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -1583,7 +1583,6 @@ class Account implements \ArrayAccess catch(\Exception $e) { _egw_log_exception($e); } - } if (strlen(trim($account['ident_realname'].$account['ident_org']))) { @@ -1593,11 +1592,11 @@ class Account implements \ArrayAccess { $name = $account['acc_name']; } - if (strpos($account['ident_email'], '@') !== false) + if (!empty(trim($account['ident_email']))) { $name .= ' <'.$account['ident_email'].'>'; } - elseif(strpos($account['acc_imap_username'], '@') !== false) + elseif(!empty(trim($account['acc_imap_username']))) { $name .= ' <'.$account['acc_imap_username'].'>'; }