From 6c0cd8fe30732c16eab4ea53a2c893de3626d02d Mon Sep 17 00:00:00 2001 From: Mathieu Lu Date: Fri, 20 Oct 2023 13:41:27 -0400 Subject: [PATCH] dev/core#4704 Display 'registration is closed' only if users can register --- CRM/Event/Page/EventInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.25.1