summaryrefslogtreecommitdiffstats
path: root/application/models/muser.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-04 16:37:32 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-04 16:37:32 +0200
commit855b7b25aeba021400aa6a3438e2ab19c3b63907 (patch)
treee8790191e864b2acd4bd9a8232d8d457c943026f /application/models/muser.php
parentcce1fe9bfea359cebae585eaaa944650bace4966 (diff)
Replace is_cli_client() with stateful_client where applicable
Stateless clients (cli client and clients using api keys) can't reclaim IDs (no cookie) so they should be required to log in asap and they will always get an error if they didn't log in. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/muser.php')
-rw-r--r--application/models/muser.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/application/models/muser.php b/application/models/muser.php
index 6a488476f..2dd7280e8 100644
--- a/application/models/muser.php
+++ b/application/models/muser.php
@@ -184,8 +184,7 @@ class Muser extends CI_Model {
return $this->check_access_level($wanted_level);
}
- // if a CLI client reaches this point it failed to log in
- if (is_cli_client()) {
+ if (!stateful_client()) {
show_error("Not authenticated. FileBin requires you to have an account, please go to the homepage for more information.\n", 401);
}