public function execute(\Koch\Event\Event $event) { $ip = \Koch\Http\HttpRequest::getRemoteAddress(); if (in_array($ip, $this->blockedIps, true)) { $event->cancel(); } }
public function execute(\Koch\Event\Event $event) { $authdata = $event->getInfo(); $logdata = [date(), $this->request->getRemoteAddress(), $event->getName(), $authdata['username']]; $this->logger->log($logdata); }