From d003b2cf124257e724062f7382ec22503539f9a0 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Tue, 22 Jul 2025 21:41:31 -0700 Subject: [PATCH 1/2] Serch publicID --- apps/hub/app/(app)/admin/event/_components/Form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/hub/app/(app)/admin/event/_components/Form.tsx b/apps/hub/app/(app)/admin/event/_components/Form.tsx index eab98338..f765118c 100644 --- a/apps/hub/app/(app)/admin/event/_components/Form.tsx +++ b/apps/hub/app/(app)/admin/event/_components/Form.tsx @@ -256,7 +256,7 @@ export const Form = ({ event }: { event?: Event }) => { Teilnehmer } - searchFields={["User.firstname", "User.lastname"]} + searchFields={["User.firstname", "User.lastname", "User.publicId"]} ref={appointmentsTableRef} prismaModel={"participant"} filter={{ -- 2.49.1 From 34a232024ea5a589448d447e4286b8ac1b0b7cbd Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 23 Jul 2025 10:10:18 +0200 Subject: [PATCH 2/2] make V1 Mail Case-Insensitive --- apps/hub/app/(auth)/passwort-reset/action.ts | 2 +- apps/hub/app/(auth)/register/action.ts | 2 +- apps/hub/app/api/auth/[...nextauth]/auth.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/hub/app/(auth)/passwort-reset/action.ts b/apps/hub/app/(auth)/passwort-reset/action.ts index 2ed3775d..a2ca9337 100644 --- a/apps/hub/app/(auth)/passwort-reset/action.ts +++ b/apps/hub/app/(auth)/passwort-reset/action.ts @@ -13,7 +13,7 @@ export const resetPassword = async (email: string) => { email, }, }); - const oldUser = (OLD_USER as OldUser[]).find((u) => u.email === email); + const oldUser = (OLD_USER as OldUser[]).find((u) => u.email.toLowerCase() === email.toLowerCase()); if (!user) { if (oldUser) { user = await createNewUserFromOld(oldUser); diff --git a/apps/hub/app/(auth)/register/action.ts b/apps/hub/app/(auth)/register/action.ts index a15bf2df..0cbe1a43 100644 --- a/apps/hub/app/(auth)/register/action.ts +++ b/apps/hub/app/(auth)/register/action.ts @@ -29,7 +29,7 @@ export const register = async ({ password, ...user }: Omit u.email === user.email); + const existingOldUser = (OLD_USER as OldUser[]).find((u) => u.email.toLocaleLowerCase() === user.email.toLocaleLowerCase()); if (existingUser) { return { diff --git a/apps/hub/app/api/auth/[...nextauth]/auth.ts b/apps/hub/app/api/auth/[...nextauth]/auth.ts index e6250f80..acf2930c 100644 --- a/apps/hub/app/api/auth/[...nextauth]/auth.ts +++ b/apps/hub/app/api/auth/[...nextauth]/auth.ts @@ -20,7 +20,7 @@ export const options: AuthOptions = { const user = await prisma.user.findFirst({ where: { email: credentials.email }, }); - const v1User = (oldUser as OldUser[]).find((u) => u.email === credentials.email); + const v1User = (oldUser as OldUser[]).find((u) => u.email.toLowerCase() === credentials.email.toLowerCase()); if (!user && v1User) { if (bcrypt.compareSync(credentials.password, v1User.password)) { const newUser = await createNewUserFromOld(v1User); -- 2.49.1