user_data: improve how returned data is handled