Fix registering new user account with same email as unconfirmed
Refactors get_user_by_email/2 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -16,7 +16,7 @@ defmodule Mix.Tasks.Mobilizon.CreateBot do
|
||||
def run([email, name, summary, type, url]) do
|
||||
start_mobilizon()
|
||||
|
||||
with {:ok, %User{} = user} <- Users.get_user_by_email(email, true),
|
||||
with {:ok, %User{} = user} <- Users.get_user_by_email(email, activated: true),
|
||||
actor <- Actors.register_bot(%{name: name, summary: summary}),
|
||||
{:ok, %Bot{} = bot} <-
|
||||
Actors.create_bot(%{
|
||||
|
||||
Reference in New Issue
Block a user