aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/ShaarliMiddleware.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-07-21 20:33:33 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commita8c11451e8d885a243c1ad52012093ba8d121e2c (patch)
tree19caf0ed75f5b26c34f3f979f2b95d3f1232dbae /application/front/ShaarliMiddleware.php
parentc4ad3d4f061d05a01db25aa54dda830ba776792d (diff)
downloadShaarli-a8c11451e8d885a243c1ad52012093ba8d121e2c.tar.gz
Shaarli-a8c11451e8d885a243c1ad52012093ba8d121e2c.tar.zst
Shaarli-a8c11451e8d885a243c1ad52012093ba8d121e2c.zip
Process login through Slim controller
Diffstat (limited to 'application/front/ShaarliMiddleware.php')
-rw-r--r--application/front/ShaarliMiddleware.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php
index 595182ac..e9f5552d 100644
--- a/application/front/ShaarliMiddleware.php
+++ b/application/front/ShaarliMiddleware.php
@@ -62,7 +62,9 @@ class ShaarliMiddleware
62 62
63 return $response->write($this->container->pageBuilder->render('error')); 63 return $response->write($this->container->pageBuilder->render('error'));
64 } catch (UnauthorizedException $e) { 64 } catch (UnauthorizedException $e) {
65 return $response->withRedirect($this->container->basePath . '/login'); 65 $returnUrl = urlencode($this->container->environment['REQUEST_URI']);
66
67 return $response->withRedirect($this->container->basePath . '/login?returnurl=' . $returnUrl);
66 } catch (\Throwable $e) { 68 } catch (\Throwable $e) {
67 // Unknown error encountered 69 // Unknown error encountered
68 $this->container->pageBuilder->reset(); 70 $this->container->pageBuilder->reset();