public function addToList(OW_Event $event) { $params = $event->getParams(); $userId = $params["userId"]; $data = array("result" => true, "message" => null, "buyCredits" => false); $available = true; if (!isset($params["checkCredits"]) || $params["checkCredits"]) { if (!OW::getUser()->isAuthorized("hotlist", "add_to_list")) { $status = BOL_AuthorizationService::getInstance()->getActionStatus("hotlist", "add_to_list"); $available = false; $data["result"] = false; if ($status["status"] == BOL_AuthorizationService::STATUS_PROMOTED) { $data["message"] = $status["msg"]; $data["buyCredits"] = true; } } } if ($available) { $this->service->addUser($userId); BOL_AuthorizationService::getInstance()->trackAction('hotlist', 'add_to_list'); $data["result"] = true; $data['message'] = OW::getLanguage()->text('hotlist', 'user_added'); } $event->setData($data); return $data; }