Username might not exist if not entered by the user

This avoids a traceback in this particular case.

Ticket:	#5130