Drop unneeded event handler

This commit is contained in:
Flavio Copes
2015-12-10 22:28:30 +01:00
parent 2996d009a8
commit 8bfe80d4a3

View File

@@ -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;