From 686aa2d0ba451b65d2054c0a3e2152ae69778297 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Sat, 15 Feb 2025 21:58:25 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(register):=20Adjust=20user?= =?UTF-8?q?=20email=20verification=20logic=20to=20handle=20domain=20suffix?= =?UTF-8?q?=20checks=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user/app/auth/email/register-form.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/user/app/auth/email/register-form.tsx b/apps/user/app/auth/email/register-form.tsx index 69924c6..a6d04bc 100644 --- a/apps/user/app/auth/email/register-form.tsx +++ b/apps/user/app/auth/email/register-form.tsx @@ -31,11 +31,10 @@ export default function RegisterForm({ const handleCheckUser = async (email: string) => { try { + if (!auth.email.enable_verify) return true; const domain = email.split('@')[1]; - const isValid = - !auth.email.enable_verify || - auth.email?.domain_suffix_list.split('\n').includes(domain || ''); - return !isValid; + const isValid = auth.email?.domain_suffix_list.split('\n').includes(domain || ''); + return isValid; } catch (error) { console.log('Error checking user:', error); return false;