function download($fieldId) { $user = $this->user->get_current_user(); if (!download_user_file($user->id, $fieldId)) { show_error("File not found", 404); } }
function download($userId, $fieldId) { if (!download_user_file($userId, $fieldId)) { show_error("File not found", 404); } }