getWebhooks(); $webhook = null; foreach ($webhooks as $candidate) { if ($whlib->verify($candidate)) { $webhook = $candidate; break; } } if (! $webhook) { http_response_code(403); echo tr("Webhook not authorized."); exit; } $user = $webhook['user']; $_SESSION[$user_cookie_site] = $user; require('lib/setup/perms.php'); require('lib/setup/user_prefs.php'); TikiLib::events()->trigger('tiki.webhook.received', [ 'webhook' => $webhook ]); http_response_code(200); echo "ok";