mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@7801 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
78c1256e5c
commit
3092624b9b
1 changed files with 22 additions and 19 deletions
|
@ -1510,29 +1510,32 @@ class user extends session
|
|||
}
|
||||
}
|
||||
|
||||
// Make sure the user is able to hide his session
|
||||
if (!$this->data['session_viewonline'])
|
||||
if (isset($this->data['session_viewonline']))
|
||||
{
|
||||
// Reset online status if not allowed to hide the session...
|
||||
if (!$auth->acl_get('u_hideonline'))
|
||||
// Make sure the user is able to hide his session
|
||||
if (!$this->data['session_viewonline'])
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . '
|
||||
SET session_viewonline = 1
|
||||
WHERE session_user_id = ' . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
$this->data['session_viewonline'] = 1;
|
||||
// Reset online status if not allowed to hide the session...
|
||||
if (!$auth->acl_get('u_hideonline'))
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . '
|
||||
SET session_viewonline = 1
|
||||
WHERE session_user_id = ' . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
$this->data['session_viewonline'] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!$this->data['user_allow_viewonline'])
|
||||
{
|
||||
// the user wants to hide and is allowed to -> cloaking device on.
|
||||
if ($auth->acl_get('u_hideonline'))
|
||||
else if (!$this->data['user_allow_viewonline'])
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . '
|
||||
SET session_viewonline = 0
|
||||
WHERE session_user_id = ' . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
$this->data['session_viewonline'] = 0;
|
||||
// the user wants to hide and is allowed to -> cloaking device on.
|
||||
if ($auth->acl_get('u_hideonline'))
|
||||
{
|
||||
$sql = 'UPDATE ' . SESSIONS_TABLE . '
|
||||
SET session_viewonline = 0
|
||||
WHERE session_user_id = ' . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
$this->data['session_viewonline'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue