From 3b1d19966919d2c4063b6fc1a63bfe709736d91c Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Wed, 22 Sep 2021 11:16:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DKoKo=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9C=AA=E5=BC=80=E5=90=AFSMS=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=87=BA=E7=8E=B0=E4=BA=86SMS=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/users/models/user.py b/apps/users/models/user.py index 385e085da..cca83f2a6 100644 --- a/apps/users/models/user.py +++ b/apps/users/models/user.py @@ -537,7 +537,7 @@ class MFAMixin: methods = [] if self.otp_secret_key: methods.append(MFAType.OTP) - if self.phone: + if settings.XPACK_ENABLED and settings.SMS_ENABLED and self.phone: methods.append(MFAType.SMS_CODE) return methods