Beispiel #1
0
 public function __construct()
 {
     $this->view = new View();
     $this->config = ApplicationRegistry::instance();
     $this->request = RequestRegistry::getRequest();
     $this->session = SessionRegistry::instance();
     $error = $this->request->getProperty('app_error');
     if (is_null($this->session->getCurrentUser()) && $this->request->getProperty('controller') != 'login' && is_null($error)) {
         $this->redirect('/login/');
     } elseif (is_null($this->session->getCurrentUser()) && !is_null($error) && !$error instanceof \App\library\exceptions\LoginException) {
         $this->redirect('/login/');
     }
 }
Beispiel #2
0
 public function __construct()
 {
     $this->config = ApplicationRegistry::instance();
     $this->request = RequestRegistry::getRequest();
     $this->session = SessionRegistry::instance();
 }