From: yashodha Date: Fri, 31 Jul 2015 08:01:08 +0000 (+0530) Subject: CRM-16936: Donor with only email address shows no display name X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0c043d46b517f97f58d910f8a1059c26bc688e88;p=civicrm-core.git 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 --- 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'])) {