From 0e5e0c2ee83d5ae4ab8fa44a1829cc56459c1464 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 1 May 2014 11:50:18 -0700 Subject: [PATCH] Contribution Pages - Allow checksum contact to select employer --- CRM/Contribute/Form/Contribution/OnBehalfOf.php | 5 ++--- CRM/Contribute/Form/ContributionBase.php | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/OnBehalfOf.php b/CRM/Contribute/Form/Contribution/OnBehalfOf.php index bde0340157..7da9e8cae4 100644 --- a/CRM/Contribute/Form/Contribution/OnBehalfOf.php +++ b/CRM/Contribute/Form/Contribution/OnBehalfOf.php @@ -42,7 +42,7 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf { */ static function preProcess(&$form) { $session = CRM_Core_Session::singleton(); - $contactID = $session->get('userID'); + $contactID = $form->_contactID; $ufJoinParams = array( 'module' => 'onBehalf', @@ -117,8 +117,7 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf { $form->assign('fieldSetTitle', ts('Organization Details')); $form->assign('buildOnBehalfForm', TRUE); - $session = CRM_Core_Session::singleton(); - $contactID = $session->get('userID'); + $contactID = $form->_contactID; if ($contactID && count($form->_employers) >= 1) { $form->add('text', 'organization_id', ts('Select an existing related Organization OR enter a new one')); diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index f4d409e18a..36a6913f85 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -155,9 +155,9 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { /** * The contact id of the person for whom membership is being added or renewed based on the cid in the url, * checksum, or session - * @var unknown_type + * @var int */ - protected $_contactID; + public $_contactID; protected $_userID; -- 2.25.1