summaryrefslogtreecommitdiff
path: root/app/Middleware
diff options
context:
space:
mode:
Diffstat (limited to 'app/Middleware')
-rw-r--r--app/Middleware/AuthenticationMiddleware.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Middleware/AuthenticationMiddleware.php b/app/Middleware/AuthenticationMiddleware.php
index 54652e57..7eb9f745 100644
--- a/app/Middleware/AuthenticationMiddleware.php
+++ b/app/Middleware/AuthenticationMiddleware.php
@@ -20,7 +20,8 @@ class AuthenticationMiddleware extends BaseMiddleware
public function execute()
{
if (! $this->authenticationManager->checkCurrentSession()) {
- throw AccessForbiddenException::getInstance()->withoutLayout();
+ $this->response->redirect($this->helper->url->to('AuthController', 'login'));
+ return;
}
if (! $this->isPublicAccess()) {