Integrating/ Migrating two CodeIgniter applications.
Following function set on application_1 default_controller may be its work.
public function _remap($method) { $userdata = $this->session->userdata('user'); if (!empty($userdata)) { modules::run('application_2/controller/default_controller'); }}
Well, Its best that instead of merging these. you need to shift
app2/controllers => app1/controllers/app2app2/views => app1/views/app2
In this way, you can access app2 inside the app1 with some addition of routes.
I must recommend that don't shift all code of app2 in app1 as it is.
It will not good.