mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 03:46:30 +01:00
Initialize session on setup (#1451)
This makes the plugin compatible with `system.session.initialize = false` which makes it possible to have no session cookie (for frontend users) while the admin login still works.
This commit is contained in:
committed by
Andy Miller
parent
e33e7a83c3
commit
d293534c3c
@@ -144,6 +144,7 @@ class AdminPlugin extends Plugin
|
|||||||
|
|
||||||
// Only activate admin if we're inside the admin path.
|
// Only activate admin if we're inside the admin path.
|
||||||
if ($this->isAdminPath()) {
|
if ($this->isAdminPath()) {
|
||||||
|
$this->grav['session']->init();
|
||||||
$this->active = true;
|
$this->active = true;
|
||||||
|
|
||||||
// Set cache based on admin_cache option
|
// Set cache based on admin_cache option
|
||||||
|
|||||||
Reference in New Issue
Block a user