misc: Minor improvements (#1897)

This commit is contained in:
Roman Kelesidis 2025-05-04 19:40:57 +03:00 committed by GitHub
commit 14086a0ed6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 19 deletions

View file

@ -2154,10 +2154,7 @@ function getBanInfo(?int $userId = null): ?array
global $datastore;
// Get bans info from datastore
if (!$bans = $datastore->get('ban_list')) {
$datastore->update('ban_list');
$bans = $datastore->get('ban_list');
}
$bans = $datastore->get('ban_list');
if (!isset($userId)) {
return $bans;