phpmyadmin/libraries/entry_points/logout.php
Maurício Meneghini Fauth 1a14b3e4d3 Remove vim modelines
These settings are no longer required as they are guaranteed through
other coding standard tools.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 09:43:21 -03:00

24 lines
438 B
PHP

<?php
/**
* Logout script
*
* @package PhpMyAdmin
*/
declare(strict_types=1);
use PhpMyAdmin\Core;
use PhpMyAdmin\Plugins\AuthenticationPlugin;
if (! defined('PHPMYADMIN')) {
exit;
}
global $auth_plugin, $token_mismatch;
if ($_SERVER['REQUEST_METHOD'] != 'POST' || $token_mismatch) {
Core::sendHeaderLocation('./index.php?route=/');
} else {
/** @var AuthenticationPlugin $auth_plugin */
$auth_plugin->logOut();
}