summaryrefslogtreecommitdiffstats
path: root/application/helpers/filebin_helper.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-22 17:09:57 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-22 17:18:56 +0200
commit41c5abd4e8849e6a84ed2af405e9c25a74e018f3 (patch)
tree9c8a62934a5b725330d9def35653e04adca20a08 /application/helpers/filebin_helper.php
parent9538bea0908c8a3758b41967d977455af731c344 (diff)
Move user_logged_in check to controller constructor
TL;DR: Allows us to show a proper error page if encryption_key is missing from the config. muser->logged_in() can load the session class which will die if encryption_key is not set in the config causing an error to be displayed. Because the header is also loaded when we display an error loading the class will be tried again. CI maintains an array with information which classes have been tried to be loaded and will simply return true without loading again. muser->logged_in() will then try to access $this->session which doesn't exist. Since all of this happens when we are already in the header the error message appears in the navigation being hard to read. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/helpers/filebin_helper.php')
-rw-r--r--application/helpers/filebin_helper.php7
1 files changed, 0 insertions, 7 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php
index bed696c8c..6e4c84e43 100644
--- a/application/helpers/filebin_helper.php
+++ b/application/helpers/filebin_helper.php
@@ -323,13 +323,6 @@ function auth_driver_function_implemented($function)
return $result[$function];
}
-function user_logged_in()
-{
- $CI =& get_instance();
- $CI->load->model("muser");
- return $CI->muser->logged_in();
-}
-
function send_json_reply($array, $status = "success")
{
$reply = array();