fix: use correct variable

Fixes an error introduced in commit 7a80015225.
This commit is contained in:
Johann150 2022-08-10 23:59:35 +02:00
parent 609fb91ca1
commit 961fb0d2df
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -14,7 +14,7 @@ const logger = remoteLogger.createSubLogger('resolve-user');
export async function resolveUser(username: string, idnHost: string | null): Promise<User> {
const usernameLower = username.toLowerCase();
if (host == null) {
if (idnHost == null) {
logger.info(`return local user: ${usernameLower}`);
return await Users.findOneBy({ usernameLower, host: IsNull() }).then(u => {
if (u == null) {