aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-06-14 15:03:52 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-06-14 15:03:52 +0000
commit6813967ae1024d386c6f829256a66f9391791dda (patch)
tree388382dc11f437491eb43a4707b029759691903f /phpBB/includes/session.php
parent9693f31404037cce3067f249d1cbbb93ef705cab (diff)
downloadforums-6813967ae1024d386c6f829256a66f9391791dda.tar
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.gz
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.bz2
forums-6813967ae1024d386c6f829256a66f9391791dda.tar.xz
forums-6813967ae1024d386c6f829256a66f9391791dda.zip
Changing the behaviour of the hideonline permission.
Test the current setting before altering the memory limit during install(Bug #12195) And another language var. git-svn-id: file:///svn/phpbb/trunk@7755 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 5e22576fdc..4f1732f30c 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1506,6 +1506,33 @@ class user extends session
trigger_error('BOARD_UNAVAILABLE');
}
}
+
+ // Make sure the user is able to hide his session
+ if (!$this->data['session_viewonline'])
+ {
+ // 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;
+ }
+ }
+ elseif (!$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 . '
+ SET session_viewonline = 0
+ WHERE session_user_id = ' . $this->data['user_id'];
+ $db->sql_query($sql);
+ $this->data['session_viewonline'] = 0;
+ }
+ }
+
// Does the user need to change their password? If so, redirect to the
// ucp profile reg_details page ... of course do not redirect if we're already in the ucp