You definitely need to make sure that you do not show the actual "username" in the URL if you have a public URL.
If you use an ID, just remember to avoid the mistake Wordpress made by sequentially creating user IDs starting with the default admin user as "1".
This made it easier for hackers to request something like
example.com/profile?author=1
It will return
example.com/admimuser
And show him the actual admin username ... and then the cracker will start knocking, trying to overdo the admin password.
And never show the login name to anyone or any URL other than the user or administrators!
source share