summaryrefslogtreecommitdiff
path: root/program/steps/mail/addcontact.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/addcontact.inc')
-rw-r--r--program/steps/mail/addcontact.inc5
1 files changed, 1 insertions, 4 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc
index 03adcbe21..0baf6cd63 100644
--- a/program/steps/mail/addcontact.inc
+++ b/program/steps/mail/addcontact.inc
@@ -49,10 +49,7 @@ if (!empty($_POST['_address']) && is_object($CONTACTS))
}
$contact['email'] = rcube_idn_to_utf8($contact['email']);
-
- // use email address part for name
- if (empty($contact['name']) || $contact['name'] == $contact['email'])
- $contact['name'] = ucfirst(preg_replace('/[\.\-]/', ' ', substr($contact['email'], 0, strpos($contact['email'], '@'))));
+ $contact['name'] = rcube_addressbook::compose_display_name($contact);
// check for existing contacts
$existing = $CONTACTS->search('email', $contact['email'], true, false);