update user company

This commit is contained in:
Wian Drs
2026-09-11 18:42:12 +07:00
parent 387ca54679
commit b011272f28
3 changed files with 143 additions and 8 deletions
+11 -1
View File
@@ -13,7 +13,17 @@ class MY_Controller extends CI_Controller
}
if ($this->db->table_exists('companies')) {
$this->load->library('CompanyContext');
$this->companycontext->id();
try {
$this->companycontext->id();
} catch (BusinessException $exception) {
$this->session->unset_userdata(array(
'user_id', 'nama', 'username', 'role', 'role_id',
'is_super_admin', 'permissions', 'company_id', 'logged_in'
));
$this->session->set_flashdata('error', $exception->getMessage());
redirect('auth');
exit;
}
}
$this->enforceRoutePermission();
}