mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-06 21:35:49 +01:00
Merge commit 'f2dbf9181ddcafe2cf1884eac2acbfd0a4d2d08d' into develop
* commit 'f2dbf9181ddcafe2cf1884eac2acbfd0a4d2d08d': Fix session cookie path for login
This commit is contained in:
@@ -96,6 +96,7 @@ class AdminPlugin extends Plugin
|
|||||||
if (substr($this->uri->route(), 0, strlen($this->base)) == $this->base) {
|
if (substr($this->uri->route(), 0, strlen($this->base)) == $this->base) {
|
||||||
// Change login behavior.
|
// Change login behavior.
|
||||||
$this->config->set('plugins.login', $this->config->get('plugins.admin.login'));
|
$this->config->set('plugins.login', $this->config->get('plugins.admin.login'));
|
||||||
|
$this->config->set('plugins.login.session.path', $this->uri->rootUrl(false) . $this->base);
|
||||||
|
|
||||||
$this->active = true;
|
$this->active = true;
|
||||||
}
|
}
|
||||||
@@ -282,9 +283,6 @@ class AdminPlugin extends Plugin
|
|||||||
'onTask.GPM' => ['onTaskGPM', 0]
|
'onTask.GPM' => ['onTaskGPM', 0]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Change login behavior.
|
|
||||||
$this->config->set('plugins.login', $this->config->get('plugins.admin.login'));
|
|
||||||
|
|
||||||
// Decide admin template and route.
|
// Decide admin template and route.
|
||||||
$path = trim(substr($this->uri->route(), strlen($this->base)), '/');
|
$path = trim(substr($this->uri->route(), strlen($this->base)), '/');
|
||||||
$this->template = 'dashboard';
|
$this->template = 'dashboard';
|
||||||
|
|||||||
Reference in New Issue
Block a user