user: put default user info when registering a user
authorWilliam Pitcock <nenolod@dereferenced.org>
Wed, 5 Dec 2018 03:35:41 +0000 (03:35 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 5 Dec 2018 03:35:41 +0000 (03:35 +0000)
lib/pleroma/user.ex

index 3bd92c15706591addbadd2abd4d90421eb5e71a5..74ae5ef0d7e30c9905fc32e1ddb21fc78e7d9aeb 100644 (file)
@@ -177,6 +177,7 @@ defmodule Pleroma.User do
       |> validate_format(:email, @email_regex)
       |> validate_length(:bio, max: 1000)
       |> validate_length(:name, min: 1, max: 100)
+      |> put_change(:info, %Pleroma.User.Info{})
 
     if changeset.valid? do
       hashed = Pbkdf2.hashpwsalt(changeset.changes[:password])