Don't sent reset email when user is disabled

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-10-13 15:21:00 +02:00
parent 53c4f5dfde
commit 71476ee587
2 changed files with 18 additions and 1 deletions

View File

@@ -383,7 +383,7 @@ defmodule Mobilizon.Users do
defp user_by_email_query(email, true) do
from(
u in User,
where: u.email == ^email and not is_nil(u.confirmed_at),
where: u.email == ^email and not is_nil(u.confirmed_at) and not u.disabled,
preload: :default_actor
)
end