From 0c043d46b517f97f58d910f8a1059c26bc688e88 Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 31 Jul 2015 13:31:08 +0530 Subject: [PATCH] CRM-16936: Donor with only email address shows no display name ---------------------------------------- * CRM-16936: Donor with only email address shows no display name https://issues.civicrm.org/jira/browse/CRM-16936 --- CRM/Contact/BAO/Contact.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index c32b27d9a5..06cd9f22ab 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2126,6 +2126,9 @@ ORDER BY civicrm_email.is_primary DESC"; } elseif ($fieldName == 'email') { $data['email'][$loc]['email'] = $value; + if (empty($contactID)) { + $data['email'][$loc]['is_primary'] = 1; + } } elseif ($fieldName == 'im') { if (isset($params[$key . '-provider_id'])) { -- 2.25.1