if (!empty($this->_ccid)) {
$this->_params['contribution_id'] = $this->_ccid;
}
+ //Set email-bltID if pre/post profile contains an email.
+ if ($this->_emailExists == TRUE) {
+ foreach ($this->_params as $key => $val) {
+ if (substr($key, 0, 6) == 'email-' && empty($this->_params["email-{$this->_bltID}"])) {
+ $this->_params["email-{$this->_bltID}"] = $this->_params[$key];
+ }
+ }
+ }
// add a description field at the very beginning
$this->_params['description'] = ts('Online Contribution') . ': ' . (($this->_pcpInfo['title']) ? $this->_pcpInfo['title'] : $this->_values['title']);
// lets just bump this to a regular session error and redirect user to main page
$this->controller->invalidKeyRedirect();
}
+ $this->_emailExists = $this->get('emailExists');
// this was used prior to the cleverer this_>getContactID - unsure now
$this->_userID = CRM_Core_Session::singleton()->getLoggedInContactID();
!in_array($profileContactType, array('honor', 'onbehalf'))
) {
$this->_emailExists = TRUE;
+ $this->set('emailExists', TRUE);
}
}