From 8bfe80d4a3fecc57ce09a91ac72ebca5226cde1f Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Thu, 10 Dec 2015 22:28:30 +0100 Subject: [PATCH] Drop unneeded event handler --- admin.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/admin.php b/admin.php index 0734a451..5e279bbd 100644 --- a/admin.php +++ b/admin.php @@ -73,11 +73,9 @@ class AdminPlugin extends Plugin 'onShutdown' => ['onShutdown', 1000], 'onFormProcessed' => ['onFormProcessed', 0] ]; - } else { - return [ - 'onFormProcessed' => ['onFormProcessed', 0] - ]; } + + return []; } /** @@ -105,6 +103,7 @@ class AdminPlugin extends Plugin // If no users found, go to register if (!count($user_check) > 0) { if (!$this->isAdminPath()) { + $this->grav->redirect($this->base); } @@ -115,8 +114,6 @@ class AdminPlugin extends Plugin } } - - // Only activate admin if we're inside the admin path. if ($this->isAdminPath()) { $this->active = true;