BugFix: Do not break if username (loginname) is passed as userid.