Skip to content
Snippets Groups Projects
Commit f6060879 authored by lobo's avatar lobo
Browse files

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
parent 11a8fcf8
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment