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.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php
index 29d0642..5340954 100644
--- a/h-source/Application/Controllers/BaseController.php
+++ b/h-source/Application/Controllers/BaseController.php
@@ -25,6 +25,7 @@ class BaseController extends Controller
protected $lang;
protected $ismoderator = false;
+ protected $isadmin = false;
protected $querySanitized = true;
protected $token = 'token';
@@ -59,6 +60,7 @@ class BaseController extends Controller
$data['islogged'] = 'no';
$data['token'] = 'token';
$data['ismoderator'] = false;
+ $data['isadmin'] = false;
if ($this->s['registered']->status['status'] === 'logged')
{
@@ -66,8 +68,12 @@ class BaseController extends Controller
$data['islogged'] = 'yes';
$data['token'] = $this->s['registered']->status['token'];
$this->token = $data['token'];
+
$data['ismoderator'] = in_array('moderator',$this->s['registered']->status['groups']) ? true : false;
$this->ismoderator = $data['ismoderator'];
+
+ $data['isadmin'] = in_array('admin',$this->s['registered']->status['groups']) ? true : false;
+ $this->isadmin = $data['isadmin'];
}
$data['lang'] = 'en';