Show user's ban status (#1258)

This commit is contained in:
Cønstantine Kovalensky 2023-12-25 23:07:47 +04:00 committed by GitHub
commit 0791859923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 3 deletions

View file

@ -74,12 +74,18 @@ if (bf($profiledata['user_opt'], 'user_opt', 'dis_sig')) {
$signature = bbcode2html($signature);
}
$user_banned = false;
if (DB()->fetch_row('SELECT ban_userid FROM ' . BB_BANLIST . " WHERE ban_userid = {$profiledata['user_id']} LIMIT 1")) {
$user_banned = true;
}
$template->assign_vars([
'PAGE_TITLE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']),
'USERNAME' => $profiledata['username'],
'PROFILE_USER_ID' => $profiledata['user_id'],
'PROFILE_USER' => $profile_user_id,
'USER_REGDATE' => bb_date($profiledata['user_regdate'], 'Y-m-d H:i', false),
'BANNED' => $user_banned,
'POSTER_RANK' => ($poster_rank) ? "<span class=\"$rank_style\">" . $poster_rank . "</span>" : $lang['USER'],
'RANK_IMAGE' => $rank_image,
'RANK_SELECT' => $rank_select,