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, 4 insertions, 1 deletions
diff --git a/program/steps/mail/addcontact.inc b/program/steps/mail/addcontact.inc
index 8e11272e0..74768116e 100644
--- a/program/steps/mail/addcontact.inc
+++ b/program/steps/mail/addcontact.inc
@@ -61,7 +61,10 @@ if (!empty($_POST['_address']) && is_object($CONTACTS))
}
$contact['email'] = rcube_idn_to_utf8($contact['email']);
- $contact['name'] = rcube_addressbook::compose_display_name($contact);
+ $contact = $RCMAIL->plugins->exec_hook('contact_displayname', $contact);
+
+ if (empty($contact['firstname']) || empty($contact['surname']))
+ $contact['name'] = rcube_addressbook::compose_display_name($contact);
// validate contact record
if (!$CONTACTS->validate($contact, true)) {