From 2aaa619e9b3e383e06061bdd9dea9b8e167753b3 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Thu, 20 Aug 2020 21:35:47 +0100 Subject: [PATCH] Cleanup variables in event/contribution register forms --- CRM/Contribute/Form/Contribution/Main.php | 3 +-- CRM/Event/Form/Registration/Register.php | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index d215092d92..7753b2a135 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -330,8 +330,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu } } - $contactID = $this->getContactID(); - if ($this->getContactID() === 0) { + if ($contactID === 0) { $this->addCidZeroOptions(); } diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index e44c213172..bd133450b0 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -391,8 +391,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { self::buildAmount($this); } - $pps = $this->getProcessors(); - if ($this->getContactID() === 0 && !$this->_values['event']['is_multiple_registrations']) { + if ($contactID === 0 && !$this->_values['event']['is_multiple_registrations']) { //@todo we are blocking for multiple registrations because we haven't tested $this->addCIDZeroOptions(); } @@ -405,9 +404,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { $this->assign('bypassPayment', $bypassPayment); - $userID = $this->getContactID(); - - if (!$userID) { + if (!$contactID) { $createCMSUser = FALSE; if ($this->_values['custom_pre_id']) { -- 2.25.1