From 330fa4b047db9edd345daaac0f6e42f8d0c8ba37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Charvet=20=E9=BB=91=E7=93=9C?= Date: Wed, 5 Jun 2024 20:25:43 +0100 Subject: [PATCH] Don't create a reset code at user creation The code to verify the email is created and stored under user.stat.verification_code, and the reset code created was just useless. The code that removed the use of this token was introduced in 6668f473c "general cleanup", that seems to have been an oversight. --- lib/teiserver/common/email_helper.ex | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/teiserver/common/email_helper.ex b/lib/teiserver/common/email_helper.ex index 09f820f5f..5ff5ac8fc 100644 --- a/lib/teiserver/common/email_helper.ex +++ b/lib/teiserver/common/email_helper.ex @@ -22,14 +22,6 @@ defmodule Teiserver.EmailHelper do website_url = "https://#{host}" verification_code = stats["verification_code"] - {:ok, _code} = - Teiserver.Account.create_code(%{ - value: UUID.uuid4(), - purpose: "reset_password", - expires: Timex.now() |> Timex.shift(hours: 24), - user_id: user.id - }) - message_id = "<#{UUID.uuid4()}@#{host}>" game_name = Application.get_env(:teiserver, Teiserver)[:game_name]