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 (isset($this->data['session_viewonline']))
if (!$this->data['session_viewonline'])
{ {
// Reset online status if not allowed to hide the session... // Make sure the user is able to hide his session
if (!$auth->acl_get('u_hideonline')) if (!$this->data['session_viewonline'])
{ {
$sql = 'UPDATE ' . SESSIONS_TABLE . ' // Reset online status if not allowed to hide the session...
SET session_viewonline = 1 if (!$auth->acl_get('u_hideonline'))
WHERE session_user_id = ' . $this->data['user_id']; {
$db->sql_query($sql); $sql = 'UPDATE ' . SESSIONS_TABLE . '
$this->data['session_viewonline'] = 1; 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'])
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'))
{ {
$sql = 'UPDATE ' . SESSIONS_TABLE . ' // the user wants to hide and is allowed to -> cloaking device on.
SET session_viewonline = 0 if ($auth->acl_get('u_hideonline'))
WHERE session_user_id = ' . $this->data['user_id']; {
$db->sql_query($sql); $sql = 'UPDATE ' . SESSIONS_TABLE . '
$this->data['session_viewonline'] = 0; SET session_viewonline = 0
WHERE session_user_id = ' . $this->data['user_id'];
$db->sql_query($sql);
$this->data['session_viewonline'] = 0;
}
} }
} }