Making login redirect you to where you were trying to go after logging in.
This commit is contained in:
parent
d9264378e7
commit
83a74952ee
2 changed files with 14 additions and 1 deletions
|
|
@ -51,6 +51,7 @@ class Application extends b8\Application
|
|||
$response->setResponseCode(401);
|
||||
$response->setContent('');
|
||||
} else {
|
||||
$_SESSION['login_redirect'] = substr($request->getPath(), 1);
|
||||
$response = new RedirectResponse($response);
|
||||
$response->setHeader('Location', PHPCI_URL.'session/login');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue