Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->hook->add_action(FA, 'pre_action', function () {
         if (!IS_LOGGED) {
             $not_login_needed = array('login');
             if (!in_array(CUR_ACTION, $not_login_needed)) {
                 redirect(BASE_URL . 'manager/login');
             }
             //$login_needed = array('index');
             //if (in_array(CUR_ACTION, $login_needed))
             //{
             //   redirect(BASE_URL . 'manager/login');
             //}
         }
     });
 }
Example #2
0
/**
 * Reference to the FA_Controller method.
 *
 * Returns current FA instance object
 *
 * @return \FA\CORE\FA_Controller
 */
function &fa_instance()
{
    return \FA\CORE\FA_Controller::get_instance();
}