]> git.agnieray.net Git - galette.git/commitdiff
Fix redirection when not authenticated
authorJohan Cwiklinski <johan@x-tnd.be>
Mon, 13 Feb 2017 06:11:42 +0000 (07:11 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Mon, 13 Feb 2017 06:11:42 +0000 (07:11 +0100)
galette/includes/main.inc.php
galette/includes/routes/authentication.routes.php

index 1af7db3bce3fbe6a6ab3dd3ecd84c64a4e4466bb..5c18b68025e4a386ba4af6401b45f780b8986c84 100644 (file)
@@ -141,7 +141,7 @@ require_once GALETTE_ROOT . 'includes/smarty.inc.php';
 $authenticate = function ($request, $response, $next) use ($container) {
     $login = $container->session->login;
 
-    if (!$login->isLogged()) {
+    if (!$login || !$login->isLogged()) {
         //$this->session->urlRedirect = $request->getPathInfo();
         $this->flash->addMessage('error_detected', _T("Login required"));
         return $response
index e902121364d3f6810e713d5452d1a43e35ee344e..c84d9c913b4a1fe4872c189daeee16b62dd2bbc7 100644 (file)
@@ -195,8 +195,6 @@ $app->post(
                     $df = _T("Y-m-d H:i:s");
                     $scheme = (isset($_SERVER['HTTPS']) ? 'https' : 'http');
 
-                    var_dump();
-                    exit;
                     $texts = new Texts(
                         $this->texts_fields,
                         $this->preferences,