From 81abab8ae10c5a022f5bf31229a743a826c0e9a0 Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Sun, 23 Jun 2019 19:06:24 +0100 Subject: [PATCH] Set logged in contact ID as default if one is not specified - this allows permission checks etc. to work properly. --- CRM/Core/Page/EntityPageTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Page/EntityPageTrait.php b/CRM/Core/Page/EntityPageTrait.php index f5ff7867de..2d6b1228a9 100644 --- a/CRM/Core/Page/EntityPageTrait.php +++ b/CRM/Core/Page/EntityPageTrait.php @@ -145,7 +145,8 @@ trait CRM_Core_Page_EntityPageTrait { $this->assign('action', $this->getAction()); $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); - $this->setContactId(CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE)); + $this->setContactId(CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE, CRM_Core_Session::getLoggedInContactID())); + $this->assign('contactId', $this->getContactId()); $this->_context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this, FALSE, $this->getDefaultContext()); -- 2.25.1