git-svn-id: file:///svn/phpbb/trunk@7801 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-06-27 10:08:33 +00:00
parent 78c1256e5c
commit 3092624b9b

View file

@ -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;
}
}
}