From: eileen Date: Tue, 6 Aug 2013 21:18:39 +0000 (+1200) Subject: CRM-12869 ensure giftors email is not over-written on behalf membership X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=364177493f8b2fa94ff08668cabe3894476d628b;p=civicrm-core.git CRM-12869 ensure giftors email is not over-written on behalf membership --- diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index e768561bd1..b8434f4d4c 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1346,8 +1346,10 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; $formValues["address_name-{$this->_bltID}"] = trim($formValues["address_name-{$this->_bltID}"]); $fields["address_name-{$this->_bltID}"] = 1; - - $fields["email-{$this->_bltID}"] = 1; + //ensure we don't over-write the payer's email with the member's email + if($this->_contributorContactID == $this->_contactID) { + $fields["email-{$this->_bltID}"] = 1; + } $ctype = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactID, 'contact_type');