fix undefined hostname for users

@trobrock