aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/classes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-01-16 17:37:44 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-01-16 17:37:44 +0000
commit4f9028df6022abac5886a374f9ea6dc84a9a63f2 (patch)
treee5419966949db5af4b50f67120b53f928701224c /phpBB/includes/classes
parentd353f4bdfc115aed9097249775298c79777d6157 (diff)
downloadforums-4f9028df6022abac5886a374f9ea6dc84a9a63f2.tar
forums-4f9028df6022abac5886a374f9ea6dc84a9a63f2.tar.gz
forums-4f9028df6022abac5886a374f9ea6dc84a9a63f2.tar.bz2
forums-4f9028df6022abac5886a374f9ea6dc84a9a63f2.tar.xz
forums-4f9028df6022abac5886a374f9ea6dc84a9a63f2.zip
add more properties to the session...
git-svn-id: file:///svn/phpbb/trunk@9268 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/classes')
-rw-r--r--phpBB/includes/classes/session.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/phpBB/includes/classes/session.php b/phpBB/includes/classes/session.php
index 4c953d9605..616f85b349 100644
--- a/phpBB/includes/classes/session.php
+++ b/phpBB/includes/classes/session.php
@@ -68,6 +68,11 @@ abstract class phpbb_session
public $is_bot = false;
/**
+ * @var bool Is true if user is founder
+ */
+ public $is_founder = false;
+
+ /**
* @var array Extra url parameter to append to every URL in phpBB
*/
public $extra_url = array();
@@ -78,6 +83,16 @@ abstract class phpbb_session
public $need_sid = false;
/**
+ * @var array Information about current page
+ */
+ public $page = array();
+
+ /**
+ * @var string The users IP
+ */
+ public $ip = '127.0.0.1';
+
+ /**
* Init session. Empties the user data and assigns the system object (phpbb::$instances['system'])
* @access public
*/
@@ -127,6 +142,8 @@ abstract class phpbb_session
$this->time_now = time();
$this->cookie_data = array('u' => 0, 'k' => '');
$this->update_session_page = $update_session_page;
+ $this->page = $this->system['page'];
+ $this->ip = $this->system['ip'];
if (phpbb_request::is_set(phpbb::$config['cookie_name'] . '_sid', phpbb_request::COOKIE) || phpbb_request::is_set(phpbb::$config['cookie_name'] . '_u', phpbb_request::COOKIE))
{
@@ -287,6 +304,7 @@ abstract class phpbb_session
else
{
$this->is_registered = true;
+ $this->is_founder = $this->data['user_type'] == phpbb::USER_FOUNDER;
}
// Force user id to be integer...
@@ -805,7 +823,7 @@ abstract class phpbb_session
if (defined('IN_LOGIN') && $this->data['user_id'] == ANONYMOUS)
{
$this->setup('ucp');
- $this->is_registered = $this->is_bot = false;
+ $this->is_registered = $this->is_bot = $this->is_founder = false;
// Set as a precaution to allow login_box() handling this case correctly as well as this function not being executed again.
define('IN_CHECK_BAN', 1);
@@ -1094,6 +1112,7 @@ abstract class phpbb_session
$this->is_registered = ($this->data['user_id'] != ANONYMOUS && ($this->data['user_type'] == phpbb::USER_NORMAL || $this->data['user_type'] == phpbb::USER_FOUNDER)) ? true : false;
$this->is_bot = (!$this->is_registered && $this->data['user_id'] != ANONYMOUS) ? true : false;
+ $this->is_founder = $this->data['user_type'] == phpbb::USER_FOUNDER;
$this->data['user_lang'] = basename($this->data['user_lang']);
return true;