From 2e1394f96a15caf4cfda9deae6a9a9e2f261aebd Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 15 Jul 2018 09:26:28 +0200 Subject: [PATCH] Implemented logout function --- src/controller/user/User.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controller/user/User.php b/src/controller/user/User.php index a74e031..e9e8b6f 100644 --- a/src/controller/user/User.php +++ b/src/controller/user/User.php @@ -2,6 +2,7 @@ namespace controller\user; use controller\AbstractDefaultController; +use router\Router; /** * @@ -11,7 +12,13 @@ use controller\AbstractDefaultController; final class User extends AbstractDefaultController implements UserInterface { public function logout(): void - {} + { + $this->core->setUser(null); + $router = new Router(); + $router->setCore($this->core); + $router->setGet([]); + $router->route(); + } public function login(): void {