mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update sessions.php
This commit is contained in:
parent
0ec39f8d4d
commit
f3b028a92f
@ -230,13 +230,13 @@ class user_common
|
|||||||
$login = (int) ($this->data['user_id'] != GUEST_UID);
|
$login = (int) ($this->data['user_id'] != GUEST_UID);
|
||||||
$is_user = ($this->data['user_level'] != ADMIN);
|
$is_user = ($this->data['user_level'] != ADMIN);
|
||||||
$user_id = (int) $this->data['user_id'];
|
$user_id = (int) $this->data['user_id'];
|
||||||
$user_email = $this->data['user_email'];
|
|
||||||
$mod_admin_session = ($this->data['user_level'] == ADMIN || $this->data['user_level'] == MOD);
|
$mod_admin_session = ($this->data['user_level'] == ADMIN || $this->data['user_level'] == MOD);
|
||||||
|
|
||||||
// Initial ban check against user_id or IP address
|
// Initial ban check against user_id or IP address
|
||||||
if ($is_user)
|
if ($is_user)
|
||||||
{
|
{
|
||||||
preg_match('#(..)(..)(..)(..)#', USER_IP, $ip);
|
preg_match('#(..)(..)(..)(..)#', USER_IP, $ip);
|
||||||
|
$user_email = $this->data['user_email'];
|
||||||
|
|
||||||
$where_sql = "ban_ip IN('". USER_IP ."', '$ip[1]$ip[2]$ip[3]ff', '$ip[1]$ip[2]ffff', '$ip[1]ffffff')";
|
$where_sql = "ban_ip IN('". USER_IP ."', '$ip[1]$ip[2]$ip[3]ff', '$ip[1]$ip[2]ffff', '$ip[1]ffffff')";
|
||||||
$where_sql .= ($login) ? " OR ban_userid = $user_id" : '';
|
$where_sql .= ($login) ? " OR ban_userid = $user_id" : '';
|
||||||
|
Loading…
Reference in New Issue
Block a user