public function profile_get() { $this->auth(); try { $profile = $this->model->get_profile($this->user_id); if (!$profile) { $this->response(sprintf(lang('not_found'), ucfirst(lang('user'))), 404); } $this->response($profile, 200); } catch (Exception $e) { $this->response($e->getMessage(), $e->getCode()); } }