diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2010-11-02 12:40:21 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2010-11-02 12:40:21 +0000 |
commit | 4daafefd0c29440c6fbad2239be2803ad04b92cd (patch) | |
tree | 05015ae5c876c7cc60ccca207f21e398ce99b5f2 /h-source/Application/Controllers/IssuesController.php | |
parent | 049e37619a1ea7de4eed2695139645d6d6b9f397 (diff) |
moderators can block/unblock users - part 2
Diffstat (limited to 'h-source/Application/Controllers/IssuesController.php')
-rw-r--r-- | h-source/Application/Controllers/IssuesController.php | 5 |
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'); |