Example #1
0
 function beforeroute()
 {
     global $upgrade_access_check;
     parent::beforeroute();
     $auth = AuthManager::instance();
     if ($upgrade_access_check) {
         if (!$auth->isLoggedIn() || !$auth->getUser()->isAdministrator()) {
             $this->accessDenied();
         }
     }
     $this->f3->set('upgrade_access_check', $upgrade_access_check);
     $this->f3->set('@import url(' . $this->f3->get('base_path') . 'upgrade/upgrade.css);');
 }
Example #2
0
 public function beforeroute()
 {
     parent::beforeroute();
     $auth = AuthManager::instance();
     if (!$auth->isLoggedIn()) {
         if ($this->f3->get('AJAX')) {
             $this->f3->status(401);
             header('Content-Type: application/json');
             print json_encode(array('error' => 'unauthorized', 'error_description' => $this->t('Unauthorized')));
             exit;
         } else {
             $route = ltrim($this->f3->get('PARAMS.0'), '/');
             $this->f3->reroute('@auth_login(1=' . $route . ')');
         }
     }
     if (!$this->f3->get('AJAX')) {
         $this->f3->set('user_header', true);
         $this->f3->set('logout_link', true);
         $this->insertNav();
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->auth = AuthManager::instance();
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->oauth = OAuthManager::instance();
     $this->mgr = ModuleManager::instance();
 }
Example #5
0
 /**
  * Creates an instance of the store module.
  *
  * The default constructor registers the store module with the
  * store manager by calling {@link StoreManager::addStore()}.
  */
 public function __construct()
 {
     parent::__construct();
     $store_manager = StoreManager::instance();
     $store_manager->addStore($this, $this->getStores());
 }
 public function __construct()
 {
     parent::__construct();
     $mgr = ModuleManager::instance();
     $mgr->loadModule('SimpleID\\Protocols\\Connect\\ConnectModule');
 }
Example #7
0
 function __construct()
 {
     parent::__construct();
     $this->cache = \Cache::instance();
     $this->mgr = ModuleManager::instance();
 }