function redirect_to_login(){
     \Dreamblaze\Framework\Core\Logger::debug($this->params);
     if($this->params['controller'] == 'session' && $this->params['action'] == 'add')
         $this->render_error(401);
     else
         $this->redirect_to(array('session', 'add'));
 }
Esempio n. 2
0
 public static function load_current_user(){
     if (!isset(self::$current) && !empty($_SESSION['userid'])) {
         self::$current = new User($_SESSION['userid']);
         Logger::debug('Loading current user ' . self::$current->username);
     }
     return true;
 }