aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/BaseController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/BaseController.php')
-rw-r--r--h-source/Application/Controllers/BaseController.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php
index 5340954..697b79b 100644
--- a/h-source/Application/Controllers/BaseController.php
+++ b/h-source/Application/Controllers/BaseController.php
@@ -24,6 +24,7 @@ class BaseController extends Controller
{
protected $lang;
+ protected $islogged = 'no';
protected $ismoderator = false;
protected $isadmin = false;
protected $querySanitized = true;
@@ -57,6 +58,7 @@ class BaseController extends Controller
$this->s['registered']->checkStatus();
$data['username'] = null;
+ $data['user_groups'] = null;
$data['islogged'] = 'no';
$data['token'] = 'token';
$data['ismoderator'] = false;
@@ -65,7 +67,13 @@ class BaseController extends Controller
if ($this->s['registered']->status['status'] === 'logged')
{
$data['username'] = $this->s['registered']->status['user'];
+ $groups = $this->s['registered']->status['groups'];
+ $groups[] = 'registered';
+ $data['user_groups'] = implode(',',$groups);
+
$data['islogged'] = 'yes';
+ $this->islogged = $data['islogged'];
+
$data['token'] = $this->s['registered']->status['token'];
$this->token = $data['token'];