diff --git a/Sources/Security.php b/Sources/Security.php index 8188a85f2d..acf7249425 100644 --- a/Sources/Security.php +++ b/Sources/Security.php @@ -393,11 +393,15 @@ public static function checkBans(User $user, bool $force_check = false): array && ($_SESSION['ban']['email'] ?? NAN) == ($user->email ?? NAN) ) { foreach ($restrictions as $restriction) { - if (isset($_SESSION[$restriction])) { - $bans[$restriction] = $_SESSION[$restriction]; + if (isset($_SESSION['ban'][$restriction])) { + $bans[$restriction] = $_SESSION['ban'][$restriction]; } } + if (isset($_SESSION['ban']['expire_time'])) { + $bans['expire_time'] = $_SESSION['ban']['expire_time']; + } + return $bans; }