How to return asset from custom user field
You have to make sure you enabled the option Assets in this volume have public urls in your volume settings at /admin/settings/assets/volumes/.

This checkbox is disabled by default thus your getUrl() function will always return an empty string/null.