summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/save.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/addressbook/save.inc')
-rw-r--r--program/steps/addressbook/save.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index a8dd38f27..393eb5145 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -188,8 +188,8 @@ if (!empty($cid))
$a_js_cols = array();
$record = $CONTACTS->get_record($newcid ? $newcid : $cid, true);
$record['email'] = reset($CONTACTS->get_col_values('email', $record, true));
- if (!$record['name'])
- $record['name'] = $record['email'];
+ if (empty($record['name']))
+ $record['name'] = rcube_addressbook::compose_display_name($record, true);
foreach (array('name', 'email') as $col)
$a_js_cols[] = Q((string)$record[$col]);