Is it possible to add the following code to multiple functions without retyping the code individually?
$user_id = $this->tank_auth->get_user_id();
$data['row'] = $this->Profile_model->profile_read($user_id);
I tried putting the variables in the constructor but I get undefined variables for both.
you could turn it in to a private function of the controller, i.e.
And then in every function in your controller do: