From 929175dea2650ae7de3e39c077f2bdf28aba8746 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 17 Feb 2017 08:27:34 +0100 Subject: [PATCH] [Fixed] now url /logout disconnects from admin if connected and from warehouse if connected. Trouble with new version (management of HTTP methods catched as GET instead of POST) -> PHP method set manually to make it POST --- public_html/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public_html/index.php b/public_html/index.php index f080af5..eca814e 100755 --- a/public_html/index.php +++ b/public_html/index.php @@ -85,6 +85,7 @@ // logout from admin $R->get('logout/?', function(){ + $_SERVER['REQUEST_METHOD'] = 'POST'; $req = new Request('authentificationDefault/admin', ['username' => '0', 'password' => '']); $res = $req->dispatch(); header('Location: /'); @@ -108,6 +109,7 @@ // warehouse logout $R->get('logout/?', function(){ + $_SERVER['REQUEST_METHOD'] = 'POST'; (new Request('authentificationDefault/warehouse', ['name' => '000', 'password' => '']))->dispatch(); header('Location: /'); });