public function rsp() { if (!OW::getRequest()->isAjax()) { throw new Redirect403Exception(); } if (!OW::getUser()->isAuthenticated()) { echo json_encode(array()); exit; } $kw = $_GET['term']; $context = empty($_GET["context"]) ? MCOMPOSE_BOL_Service::CONTEXT_USER : $_GET["context"]; $userId = OW::getUser()->getId(); $entries = $this->service->getSuggestEntries($userId, $kw, null, $context); echo json_encode($entries); exit; }