Fix uninitialised variables

Set $usertype and $domainname to safe non-null values to prevent
spurious errors being logged