assign('context', $context); //check for civicase access. if (!CRM_Case_BAO_Case::accessCiviCase()) { CRM_Core_Error::fatal(ts('You are not authorized to access this page.')); } $session = CRM_Core_Session::singleton(); $userID = $session->get('userID'); $upcoming = CRM_Case_BAO_Case::getCases(TRUE, $userID, 'upcoming', $context); if (!empty($upcoming)) { $this->assign('AllCases', $upcoming); } return parent::run(); } }