diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-13 21:47:56 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-13 21:47:56 +0200 |
commit | 3bd289a3c14f377c3c689f97cf20366571f6add9 (patch) | |
tree | 9b523be2327def5e18c6a22e6084bbae570f5277 /application/controllers/user.php | |
parent | f67a3cf212a774945a0d10143e93071e19dc40f4 (diff) |
Throw public exception when accessing CLI only functions
We actually don't need to hide this from the user. The error should be
shown rather than a blank page being returned.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/user.php')
-rw-r--r-- | application/controllers/user.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php index e1c01051a..5d506f9d7 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -586,7 +586,7 @@ class User extends MY_Controller { function cron() { - if (!$this->input->is_cli_request()) return; + $this->_require_cli_request(); if ($this->config->item('actions_max_age') == 0) return; @@ -641,7 +641,7 @@ class User extends MY_Controller { function add_user() { - if (!$this->input->is_cli_request()) return; + $this->_require_cli_request(); $this->duser->require_implemented("can_register_new_users"); $error = array(); |