public function before() { parent::before(); // Check login if(!$this->template->logged_in){ \Response::redirect('/users/login'); } // Check permissions if(!\Auth::instance()->has_access(array('admin', array('read')))){ // $this->response->body = \View::factory('denied'); // parent::after(); // return FALSE; // Here's where I gave up die('You do not have permission to access this page.'); } }
if(\Auth::check()) { $user = \Auth::instance()->get_user_id(); $this->user_id = $user[1]; $this->template->username = \Auth::instance()->get_screen_name(); $this->template->logged_in = true; } else { $this->template->logged_in = false; }
It looks like you're new here. If you want to get involved, click one of these buttons!