[#114] User.register/1 tweak.
authorIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 19 Dec 2018 14:24:55 +0000 (17:24 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 19 Dec 2018 14:24:55 +0000 (17:24 +0300)
lib/pleroma/user.ex

index 4e227b08d715f6aac0db9bcd61ac8163059b7ebb..4b8caf65c91f19692e15a1e4c08453e5192a5aee 100644 (file)
@@ -210,8 +210,8 @@ defmodule Pleroma.User do
 
   @doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"
   def register(%Ecto.Changeset{} = changeset) do
-    with {:ok, user} <- Repo.insert(changeset) do
-      {:ok, _} = try_send_confirmation_email(user)
+    with {:ok, user} <- Repo.insert(changeset),
+         {:ok, _} = try_send_confirmation_email(user) do
       {:ok, user}
     end
   end