mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -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
|
@ -394,6 +394,20 @@ $user = new TorrentPier\Legacy\Common\User();
|
|||
|
||||
$userdata =& $user->data;
|
||||
|
||||
/**
|
||||
* Initial ban check
|
||||
*/
|
||||
if ($banInfo = getUserBanInfo($user->id)) {
|
||||
if (!IS_GUEST) {
|
||||
$user->session_end();
|
||||
}
|
||||
if (!empty($banInfo['ban_reason'])) {
|
||||
bb_die($lang['YOU_BEEN_BANNED'] . '<br><br>' . $banInfo['ban_reason']);
|
||||
} else {
|
||||
bb_die($lang['YOU_BEEN_BANNED']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cron
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue