Code help
Posted: 17 May 2010, 13:35
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
includes/session.php
look for :
if you chagne this code to :
ip logging is disabled, but for every one, inlcuding guests which is not i want
now, i have tried the following code, but its not affecting
group 5 is the default for admins in phpbb, so if the user is not in group 5, log the ip, else not but doesn't work
i've also tried this :
that doesent work either
and this too
please debug my code and tell me whats wrong? i have been trying for 2 days now
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
includes/session.php
look for :
Code: Select all
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : '';
Code: Select all
$this->ip = '';
now, i have tried the following code, but its not affecting
Code: Select all
if ($user->data['group_id'] != 5)
{
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : '';
}
else
{
$this->ip = '';
}
i've also tried this :
Code: Select all
if (!$user->data['acp'])
{
$this->ip = '';
}
else
{
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : '';
}
and this too
Code: Select all
if ($user->data['username'] == "Anonymous" || $user->data['username']== "Guest")
{
$this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : '';
}
else
{
$this->ip = '';
}