[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
This commit is contained in:
parent
2c45bb60be
commit
929175dea2
|
@ -85,6 +85,7 @@
|
||||||
|
|
||||||
// logout from admin
|
// logout from admin
|
||||||
$R->get('logout/?', function(){
|
$R->get('logout/?', function(){
|
||||||
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
$req = new Request('authentificationDefault/admin', ['username' => '0', 'password' => '']);
|
$req = new Request('authentificationDefault/admin', ['username' => '0', 'password' => '']);
|
||||||
$res = $req->dispatch();
|
$res = $req->dispatch();
|
||||||
header('Location: /');
|
header('Location: /');
|
||||||
|
@ -108,6 +109,7 @@
|
||||||
|
|
||||||
// warehouse logout
|
// warehouse logout
|
||||||
$R->get('logout/?', function(){
|
$R->get('logout/?', function(){
|
||||||
|
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||||
(new Request('authentificationDefault/warehouse', ['name' => '000', 'password' => '']))->dispatch();
|
(new Request('authentificationDefault/warehouse', ['name' => '000', 'password' => '']))->dispatch();
|
||||||
header('Location: /');
|
header('Location: /');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue