From: Mathieu Lu Date: Fri, 20 Oct 2023 17:41:27 +0000 (-0400) Subject: dev/core#4704 Display 'registration is closed' only if users can register X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6c0cd8fe30732c16eab4ea53a2c893de3626d02d;p=civicrm-core.git dev/core#4704 Display 'registration is closed' only if users can register --- diff --git a/CRM/Event/Page/EventInfo.php b/CRM/Event/Page/EventInfo.php index 871e312586..8f9d9d2e40 100644 --- a/CRM/Event/Page/EventInfo.php +++ b/CRM/Event/Page/EventInfo.php @@ -276,8 +276,8 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page { } } } - $this->assign('registerClosed', !empty($values['event']['is_online_registration']) && !$isEventOpenForRegistration); + $this->assign('registerClosed', !empty($values['event']['is_online_registration']) && !$isEventOpenForRegistration && CRM_Core_Permission::check('register for events')); $this->assign('allowRegistration', $allowRegistration); $session = CRM_Core_Session::singleton();