Commit a532ad5d authored by Ivan Tashkinov's avatar Ivan Tashkinov
Browse files

[#114] User.register/1 tweak.

parent 968d7490
...@@ -210,8 +210,8 @@ def register_changeset(struct, params \\ %{}, opts \\ []) do ...@@ -210,8 +210,8 @@ def register_changeset(struct, params \\ %{}, opts \\ []) do
@doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)" @doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"
def register(%Ecto.Changeset{} = changeset) do def register(%Ecto.Changeset{} = changeset) do
with {:ok, user} <- Repo.insert(changeset) do with {:ok, user} <- Repo.insert(changeset),
{:ok, _} = try_send_confirmation_email(user) {:ok, _} = try_send_confirmation_email(user) do
{:ok, user} {:ok, user}
end end
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment