diff options
Diffstat (limited to 'lib/middleware/AuthenticationMiddleware.php')
| -rw-r--r-- | lib/middleware/AuthenticationMiddleware.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/middleware/AuthenticationMiddleware.php b/lib/middleware/AuthenticationMiddleware.php index f86b067..10de004 100644 --- a/lib/middleware/AuthenticationMiddleware.php +++ b/lib/middleware/AuthenticationMiddleware.php @@ -34,6 +34,8 @@ final class AuthenticationMiddleware implements MiddlewareInterface } else { if (!match_route('dispatch.php/start')) { $_SESSION['redirect_after_login'] = \Request::url(); + } else { + unset($_SESSION['redirect_after_login']); } $response = $this->response_factory->createResponse(302); return $response->withHeader('Location', \URLHelper::getURL('dispatch.php/login')); |
