Set logged in contact ID as default if one is not specified - this allows permission...
[civicrm-core.git] / 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());