public function before() { parent::before(); if ($this->auto_render) { $this->template->styles = array(); $this->template->scripts = array(); $this->template->title = ''; $this->template->header = ''; $this->template->content = ''; $this->template->footer = ''; } }
public function before() { parent::before(); if (!Auth::instance()->logged_in()) { $this->redirect('/login'); } else { if ($this->auto_render) { $this->template->styles = array(); $this->template->scripts = array(); $this->template->title = ''; $this->template->header = Site::header(Auth::instance()->get_user()->roles->find()->name); $this->template->content = ''; $this->template->footer = View::factory('page/footer'); } } }