This commit is contained in:
PxlLoewe
2025-07-24 11:58:11 -07:00
parent 0c80c046e1
commit 4c6a009764
8 changed files with 55 additions and 24 deletions

View File

@@ -29,7 +29,7 @@ export const PasswortReset = () => {
onSubmit={form.handleSubmit(async () => {
try {
setIsLoading(true);
const { error } = await resetPassword(form.getValues().email);
const { error } = await resetPassword(form.getValues().email.toLowerCase());
setIsLoading(false);
if (error) {
@@ -56,7 +56,7 @@ export const PasswortReset = () => {
<Toaster position="top-center" reverseOrder={false} />
</div>
<h1 className="text-3xl font-bold">Passwort zurücksetzen</h1>
<label className="input input-bordered flex items-center gap-2 w-full">
<label className="input input-bordered flex w-full items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
@@ -73,8 +73,8 @@ export const PasswortReset = () => {
? form.formState.errors.email.message
: ""}
</p>
<span className="text-sm font-medium flex justify-end">
<Link href="/login" className="link link-accent link-hover ">
<span className="flex justify-end text-sm font-medium">
<Link href="/login" className="link link-accent link-hover">
zum Login
</Link>
</span>

View File

@@ -13,7 +13,7 @@ export const resetPassword = async (email: string) => {
email,
},
});
const oldUser = (OLD_USER as OldUser[]).find((u) => u.email.toLowerCase() === email.toLowerCase());
const oldUser = (OLD_USER as OldUser[]).find((u) => u.email.toLowerCase() === email);
if (!user) {
if (oldUser) {
user = await createNewUserFromOld(oldUser);