public function after() { $auth = Auth::instance(); if ($auth->get_user()) { $user = ORM::factory('users', $auth->get_user()); } $this->template->user = $user; parent::after(); }
public function after() { $auth = Auth::instance(); if ($auth->get_user()) { $user = ORM::factory('users', $auth->get_user()); } else { $this->request->redirect('/login'); } $this->template->user = $user; parent::after(); }