//------------------------------------------------------------------------------ // check to make sure the user is logged in if (\Auth::check()) { // let's get the facility information $this->facility = Facility\Model_Facility::find(1); $this->template->set_global('facility', $this->facility); // get the user's information $user = \Auth::instance()->get_user_id(); $this->user = User\Model_User::find($user[1]); $this->template->set_global('user', $this->user); } else { \Response::redirect(\Config::get('common.auth.login_url')); } //------------------------------------------------------------------------------ // check to make sure the user has access if(!\Auth::has_access(array($this->request->module, array($this->request->controller.'/'.$this->request->action)))) { // Set a HTTP 503 output header $this->response->status = 503; \Response::redirect(\Config::get('common.forbidden')); }
It looks like you're new here. If you want to get involved, click one of these buttons!