mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
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:
parent
d090678e14
commit
7beb4afa72
18 changed files with 83 additions and 272 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue