From f60608798b82a0faa33f0907516eba3c68c256ef Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Mon, 20 May 2013 10:57:32 -0700 Subject: [PATCH] CRM-12667 ---------------------------------------- * CRM-12667: Tell a Friend causes error: "You do not have permission to access this page" http://issues.civicrm.org/jira/browse/CRM-12667 --- CRM/Friend/Form/Event.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Friend/Form/Event.php b/CRM/Friend/Form/Event.php index f815834fa9..9eaa8a9537 100644 --- a/CRM/Friend/Form/Event.php +++ b/CRM/Friend/Form/Event.php @@ -64,7 +64,13 @@ class CRM_Friend_Form_Event extends CRM_Event_Form_ManageEvent { $defaults['entity_table'] = 'civicrm_event'; $defaults['entity_id'] = $this->_id; CRM_Friend_BAO_Friend::getValues($defaults); - $this->_friendId = CRM_Utils_Array::value('id', $defaults); + if (CRM_Utils_Array::value('id', $defaults)) { + $defaults['tf_id'] = CRM_Utils_Array::value('id', $defaults); + $this->_friendId = $defaults['tf_id']; + // lets unset the 'id' since it conflict with eventID (or contribID) + // CRM-12667 + unset($defaults['id']); + } $defaults['tf_title'] = CRM_Utils_Array::value('title', $defaults); $defaults['tf_is_active'] = CRM_Utils_Array::value('is_active', $defaults); $defaults['tf_thankyou_title'] = CRM_Utils_Array::value('thankyou_title', $defaults); -- 2.25.1