public function reloadUserInfo() { $this->CI->load->model('company/Company_user_model', 'CompanyUserModel'); $user = $this->CI->CompanyUserModel->getUser($this->getUser()->username, $this->getUser()->company_id); $this->cmp_user = new CmpUser($user); $this->CI->load->model('company/Company_model', 'CompanyModel'); $company = $this->CI->CompanyModel->get($user['company_id']); $this->cmp_user->company = $company; UserSession::setUser($this->cmp_user); }
/** * 登出 */ public function logout() { $this->admin_user = null; UserSession::setUser(null); }