mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2024-11-22 10:11:04 +01:00
Implemented logout function
This commit is contained in:
parent
9dddf13ac1
commit
2e1394f96a
@ -2,6 +2,7 @@
|
|||||||
namespace controller\user;
|
namespace controller\user;
|
||||||
|
|
||||||
use controller\AbstractDefaultController;
|
use controller\AbstractDefaultController;
|
||||||
|
use router\Router;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -11,7 +12,13 @@ use controller\AbstractDefaultController;
|
|||||||
final class User extends AbstractDefaultController implements UserInterface
|
final class User extends AbstractDefaultController implements UserInterface
|
||||||
{
|
{
|
||||||
public function logout(): void
|
public function logout(): void
|
||||||
{}
|
{
|
||||||
|
$this->core->setUser(null);
|
||||||
|
$router = new Router();
|
||||||
|
$router->setCore($this->core);
|
||||||
|
$router->setGet([]);
|
||||||
|
$router->route();
|
||||||
|
}
|
||||||
|
|
||||||
public function login(): void
|
public function login(): void
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user