public function init() { View::set_global('controller', $this->controller); View::set_global('action', $this->action); if (Model_Base_User::is_login()) { View::set_global('head', View::forge($this->layout . '/global/head')); View::set_global('header', View::forge($this->layout . '/global/header')); View::set_global('sidebar', View::forge($this->layout . '/global/sidebar')); View::set_global('script', View::forge($this->layout . '/global/script')); list(, $auth_id) = Auth::get_user_id(); $this->user_id = $auth_id; $this->user_info = Model_Base_User::get_user_info($auth_id); $this->user_fb = Model_Base_User::get_user_fb($auth_id); View::set_global('user', $this->user_info); View::set_global('user_fb', $this->user_fb); View::set_global('base_url', Config::get('base_url')); } }