Removed auto-logout from ban page

This commit is contained in:
Pachira 2015-11-11 13:44:08 +01:00
parent edb7a9e15d
commit 32eb5bcc00

View file

@ -193,21 +193,17 @@ if (!defined('SAKURA_NO_TPL')) {
}
// Ban checking
if ($authCheck && $ban = Bans::checkBan($currentUser->id())) {
if ($authCheck && !in_array($_SERVER['PHP_SELF'], ['/authenticate.php']) && $ban = Bans::checkBan($currentUser->id())) {
// Additional render data
$renderData = array_merge($renderData, [
'ban' => [
'reason' => $ban['reason'],
'issued' => $ban['issued'],
'expires' => $ban['expires'],
'issuer' => (new User($ban['issuer'])),
],
]);
Users::logout();
// Initialise templating engine
$template = new Template();