Username might not exist if not entered by the user

This avoids a traceback in this particular case.

Ticket:	#5130
(cherry picked from commit 6d7650608b05ca73d5e87cb167b0845c472393a2)