mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-31 13:48:04 +01:00
Merge pull request #5892 from mrgoldy/ticket/16397
[ticket/16397] Expose user identifier
This commit is contained in:
commit
b90e2c6300
@ -25,6 +25,7 @@ class session
|
||||
var $forwarded_for = '';
|
||||
var $host = '';
|
||||
var $session_id = '';
|
||||
public $id = ANONYMOUS;
|
||||
var $ip = '';
|
||||
var $load = 0;
|
||||
var $time_now = 0;
|
||||
@ -362,6 +363,8 @@ class session
|
||||
// Did the session exist in the DB?
|
||||
if (isset($this->data['user_id']))
|
||||
{
|
||||
$this->id = (int) $this->data['user_id'];
|
||||
|
||||
// Validate IP length according to admin ... enforces an IP
|
||||
// check on bots if admin requires this
|
||||
// $quadcheck = ($config['ip_check_bot'] && $this->data['user_type'] & USER_BOT) ? 4 : $config['ip_check'];
|
||||
@ -647,7 +650,7 @@ class session
|
||||
}
|
||||
|
||||
// Force user id to be integer...
|
||||
$this->data['user_id'] = (int) $this->data['user_id'];
|
||||
$this->id = $this->data['user_id'] = (int) $this->data['user_id'];
|
||||
|
||||
// At this stage we should have a filled data array, defined cookie u and k data.
|
||||
// data array should contain recent session info if we're a real user and a recent
|
||||
|
Loading…
x
Reference in New Issue
Block a user