aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/IssuesController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/IssuesController.php')
-rw-r--r--h-source/Application/Controllers/IssuesController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php
index 86fc49c..efda83e 100644
--- a/h-source/Application/Controllers/IssuesController.php
+++ b/h-source/Application/Controllers/IssuesController.php
@@ -32,6 +32,7 @@ class IssuesController extends BaseController
$this->model('IssuesModel');
$this->model('MessagesModel');
+ $this->model('UsersModel');
$argKeys = array(
'page:forceNat' => 1,
@@ -58,6 +59,8 @@ class IssuesController extends BaseController
{
if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+ if ($this->m['UsersModel']->isBlocked($this->s['registered']->status['id_user'])) $this->redirect('my/home/'.$this->lang,2,'your account has been blocked..');
+
//set the page to 1 in the viewStatus
$this->viewArgs['page'] = 1;
$this->buildStatus();
@@ -125,6 +128,8 @@ class IssuesController extends BaseController
{
if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index'.$this->lang,2,'wrong token..');
+ if ($this->m['UsersModel']->isBlocked($this->s['registered']->status['id_user'])) $this->redirect('my/home/'.$this->lang,2,'your account has been blocked..');
+
$this->m['MessagesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user'];
$this->m['MessagesModel']->values['id_issue'] = $clean['id_issue'];
$this->m['MessagesModel']->updateTable('insert');