mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-02 13:50:48 +01:00
Drop unneeded event handler
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user