CRM-19028 - Change get(userID) to getLoggedInContactID()
[civicrm-core.git] / CRM / Event / BAO / Event.php
index 7fc34e205aed7cb54519f2e79eb21c05953877b5..c955de51bf5807b98b8eda407b9885d0fe83e9f9 100644 (file)
@@ -146,8 +146,7 @@ class CRM_Event_BAO_Event extends CRM_Event_DAO_Event {
       return $event;
     }
 
-    $session = CRM_Core_Session::singleton();
-    $contactId = $session->get('userID');
+    $contactId = CRM_Core_Session::getLoggedInContactID();
     if (!$contactId) {
       $contactId = CRM_Utils_Array::value('contact_id', $params);
     }