From 46ad540f68869c2c1b946588ed20c166924e095f Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 8 Feb 2023 00:42:16 +0200 Subject: [PATCH] disallow discord registration if code is required --- src/server/Server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/Server.js b/src/server/Server.js index 0cb8325..6b4236a 100644 --- a/src/server/Server.js +++ b/src/server/Server.js @@ -253,7 +253,7 @@ class Server extends EventEmitter { this.logger.info(`${profile.username} (${profile.id}) is logging in.`); // We don't need this here delete profile.accessToken; - const user = await this.userDatabase.userFromDiscord(profile, !this.registrationEnabled); + const user = await this.userDatabase.userFromDiscord(profile, !this.registrationEnabled || this.requireCodeForRegister); let err = null; if (!user) err = new Error('No such user');