phpmyadmin/libraries/classes/Controllers/LogoutController.php
Maurício Meneghini Fauth 0379fcc385
Remove the auth_plugin global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-16 16:51:22 -03:00

24 lines
450 B
PHP

<?php
declare(strict_types=1);
namespace PhpMyAdmin\Controllers;
use PhpMyAdmin\Core;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Plugins;
class LogoutController
{
public function __invoke(ServerRequest $request): void
{
if (! $request->isPost() || $GLOBALS['token_mismatch']) {
Core::sendHeaderLocation('./index.php?route=/');
return;
}
Plugins::getAuthPlugin()->logOut();
}
}