After login, redirect to the original URL called

Fix an annoying issue in Admin, when loading an inner page
(`/admin/pages/whatever`) and I'm logged out, after login I'm always
sent to the dashboard, while it should bring to the page I called in
the first place
This commit is contained in:
Flavio Copes
2016-04-01 12:41:34 +02:00
parent 3ba06ec21b
commit deaeccfffc
2 changed files with 4 additions and 5 deletions

View File

@@ -185,8 +185,7 @@ class Admin
$grav = $this->grav;
$this->setMessage($this->translate('PLUGIN_ADMIN.LOGIN_LOGGED_IN'), 'info');
$redirect_route = $this->uri->route();
$grav->redirect($redirect_route);
$grav->redirect($form['redirect']);
}
}
}