Removed auto-logout from ban page

This commit is contained in:
flash 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 // 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 // Additional render data
$renderData = array_merge($renderData, [ $renderData = array_merge($renderData, [
'ban' => [ 'ban' => [
'reason' => $ban['reason'], 'reason' => $ban['reason'],
'issued' => $ban['issued'], 'issued' => $ban['issued'],
'expires' => $ban['expires'], 'expires' => $ban['expires'],
'issuer' => (new User($ban['issuer'])), 'issuer' => (new User($ban['issuer'])),
], ],
]); ]);
Users::logout();
// Initialise templating engine // Initialise templating engine
$template = new Template(); $template = new Template();