From de8ce875f4295e0b3bef20fcca051401f96816ef Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 May 2016 21:54:50 -0400 Subject: Rename UserStatus controller --- app/Controller/UserStatus.php | 111 -------------------------------- app/Controller/UserStatusController.php | 111 ++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 app/Controller/UserStatus.php create mode 100644 app/Controller/UserStatusController.php (limited to 'app/Controller') diff --git a/app/Controller/UserStatus.php b/app/Controller/UserStatus.php deleted file mode 100644 index 6f93e953..00000000 --- a/app/Controller/UserStatus.php +++ /dev/null @@ -1,111 +0,0 @@ -getUser(); - - $this->response->html($this->helper->layout->user('user_status/remove', array( - 'user' => $user, - ))); - } - - /** - * Remove a user - * - * @access public - */ - public function remove() - { - $user = $this->getUser(); - $this->checkCSRFParam(); - - if ($this->user->remove($user['id'])) { - $this->flash->success(t('User removed successfully.')); - } else { - $this->flash->failure(t('Unable to remove this user.')); - } - - $this->response->redirect($this->helper->url->to('user', 'index')); - } - - /** - * Confirm enable a user - * - * @access public - */ - public function confirmEnable() - { - $user = $this->getUser(); - - $this->response->html($this->helper->layout->user('user_status/enable', array( - 'user' => $user, - ))); - } - - /** - * Enable a user - * - * @access public - */ - public function enable() - { - $user = $this->getUser(); - $this->checkCSRFParam(); - - if ($this->user->enable($user['id'])) { - $this->flash->success(t('User activated successfully.')); - } else { - $this->flash->failure(t('Unable to enable this user.')); - } - - $this->response->redirect($this->helper->url->to('user', 'index')); - } - - /** - * Confirm disable a user - * - * @access public - */ - public function confirmDisable() - { - $user = $this->getUser(); - - $this->response->html($this->helper->layout->user('user_status/disable', array( - 'user' => $user, - ))); - } - - /** - * Disable a user - * - * @access public - */ - public function disable() - { - $user = $this->getUser(); - $this->checkCSRFParam(); - - if ($this->user->disable($user['id'])) { - $this->flash->success(t('User disabled successfully.')); - } else { - $this->flash->failure(t('Unable to disable this user.')); - } - - $this->response->redirect($this->helper->url->to('user', 'index')); - } -} diff --git a/app/Controller/UserStatusController.php b/app/Controller/UserStatusController.php new file mode 100644 index 00000000..2b23505c --- /dev/null +++ b/app/Controller/UserStatusController.php @@ -0,0 +1,111 @@ +getUser(); + + $this->response->html($this->helper->layout->user('user_status/remove', array( + 'user' => $user, + ))); + } + + /** + * Remove a user + * + * @access public + */ + public function remove() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->remove($user['id'])) { + $this->flash->success(t('User removed successfully.')); + } else { + $this->flash->failure(t('Unable to remove this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } + + /** + * Confirm enable a user + * + * @access public + */ + public function confirmEnable() + { + $user = $this->getUser(); + + $this->response->html($this->helper->layout->user('user_status/enable', array( + 'user' => $user, + ))); + } + + /** + * Enable a user + * + * @access public + */ + public function enable() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->enable($user['id'])) { + $this->flash->success(t('User activated successfully.')); + } else { + $this->flash->failure(t('Unable to enable this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } + + /** + * Confirm disable a user + * + * @access public + */ + public function confirmDisable() + { + $user = $this->getUser(); + + $this->response->html($this->helper->layout->user('user_status/disable', array( + 'user' => $user, + ))); + } + + /** + * Disable a user + * + * @access public + */ + public function disable() + { + $user = $this->getUser(); + $this->checkCSRFParam(); + + if ($this->user->disable($user['id'])) { + $this->flash->success(t('User disabled successfully.')); + } else { + $this->flash->failure(t('Unable to disable this user.')); + } + + $this->response->redirect($this->helper->url->to('user', 'index')); + } +} -- cgit v1.2.3