Set logged in contact ID as default if one is not specified - this allows permission...
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 23 Jun 2019 18:06:24 +0000 (19:06 +0100)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Sun, 23 Jun 2019 18:06:24 +0000 (19:06 +0100)
CRM/Core/Page/EntityPageTrait.php

index f5ff7867deda03bbf6d7797cd47249164b6ff0bd..2d6b1228a96676b1cad6b25fc4048ae05ff5a561 100644 (file)
@@ -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());