Some improvements for Ban functionality (#1262)

* Some improvements for Ban functionality

* Updated

* Updated

* Update functions.php

* Updated

* Update viewprofile.php

* Update viewtopic.php

* Updated

* Updated

* Updated

* Updated

* Update mysql.sql

* Updated

* Updated
This commit is contained in:
Roman Kelesidis 2023-12-26 17:38:16 +07:00 committed by GitHub
commit 7beb4afa72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 83 additions and 272 deletions

View file

@ -2170,3 +2170,24 @@ function user_birthday_icon($user_birthday, $user_id): string
return ($bb_cfg['birthday_enabled'] && $current_date == $user_birthday) ? '<img src="' . $images['icon_birthday'] . '" alt="' . $lang['HAPPY_BIRTHDAY'] . '" title="' . $lang['HAPPY_BIRTHDAY'] . '" border="0" />' : '';
}
/**
* Returns information about user ban
*
* @param int $userId
* @return array
*/
function getUserBanInfo(int $userId): array
{
return DB()->fetch_row("SELECT * FROM " . BB_BANLIST . " WHERE ban_userid = $userId LIMIT 1");
}
/**
* Returns information about all bans
*
* @return array
*/
function getAllBans(): array
{
return DB()->fetch_rowset("SELECT * FROM " . BB_BANLIST);
}