Making login redirect you to where you were trying to go after logging in.

This commit is contained in:
Dan Cryer 2014-05-09 11:41:34 +01:00
commit 83a74952ee
2 changed files with 14 additions and 1 deletions

View file

@ -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');
}