can not login for pending user - #877

This commit is contained in:
Laurent GAY
2025-09-13 16:43:00 +02:00
parent e78ff057c2
commit 23cd7333c4
6 changed files with 58 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ defmodule Mobilizon.Users do
Gets an user by its email.
"""
@spec get_user_by_email(String.t(), Keyword.t()) ::
{:ok, User.t()} | {:error, :user_not_found}
{:ok, User.t()} | {:error, :user_not_found} | {:error, :user_pending}
def get_user_by_email(email, options \\ []) do
activated = Keyword.get(options, :activated, nil)
unconfirmed = Keyword.get(options, :unconfirmed, true)