From c156d4d6f1d69cfb9e578901f485b67e39f70cf3 Mon Sep 17 00:00:00 2001 From: Eileen Date: Sat, 4 Jan 2014 12:57:20 +1300 Subject: [PATCH] CRM-14043 - cid=0 contribution form giving contribution to logged in user ---------------------------------------- * CRM-14043: cid=0 contribution form giving contribution to logged in user http://issues.civicrm.org/jira/browse/CRM-14043 --- CRM/Core/Form.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 5e6f2c78d3..d42f6246f7 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1353,8 +1353,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { // event form stores as an indexed array, contribution form not so much... $tempID = $this->_params[0]['select_contact_id']; } + // force to ignore the authenticated user - if ($tempID === '0') { + if ($tempID === '0' || $tempID === 0) { + // we set the cid on the form so that this will be retained for the Confirm page + // in the multi-page form & prevent us returning the $userID when this is called + // from that page + // we don't really need to set it when $tempID is set because the params have that stored + $this->set('cid', 0); return $tempID; } -- 2.25.1