Create an insecure bank application
This commit is contained in:
21
webroot/lib/Controller/LogoutController.php
Normal file
21
webroot/lib/Controller/LogoutController.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Controller;
|
||||
|
||||
use View\LogoutRedirection;
|
||||
use View\Sendable;
|
||||
|
||||
class LogoutController extends RestrictedPageController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('/logout.php');
|
||||
}
|
||||
|
||||
protected function runLogic(): Sendable
|
||||
{
|
||||
$this->context->session->destroy();
|
||||
return new LogoutRedirection();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user