diff options
author | dtluna <dtluna@openmailbox.org> | 2017-04-16 17:18:34 +0300 |
---|---|---|
committer | dtluna <dtluna@openmailbox.org> | 2017-04-16 17:18:34 +0300 |
commit | ef5033d7a7f744607235e974c7beb96b014c2b61 (patch) | |
tree | b885af1dedf3978ad265cf769713915d04510d0f /lib/mix/tasks | |
parent | a8e50d602ba25b2062e0e676e1dd115da64c2565 (diff) | |
parent | e158e32124a62f2c93a8910bf3edc4519c4a13e6 (diff) | |
download | pleroma-ef5033d7a7f744607235e974c7beb96b014c2b61.tar.gz |
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into bugfix/repeated-follow-unfollow
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r-- | lib/mix/tasks/register_user.ex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mix/tasks/register_user.ex b/lib/mix/tasks/register_user.ex index e2f36c34c..48236439b 100644 --- a/lib/mix/tasks/register_user.ex +++ b/lib/mix/tasks/register_user.ex @@ -6,15 +6,17 @@ defmodule Mix.Tasks.RegisterUser do @shortdoc "Register user" def run([name, nickname, email, bio, password]) do ensure_started(Repo, []) - user = %User{ + + params = %{ name: name, nickname: nickname, email: email, - password_hash: Comeonin.Pbkdf2.hashpwsalt(password), + password: password, + password_confirmation: password, bio: bio } - user = %{ user | ap_id: User.ap_id(user) } + user = User.register_changeset(%User{}, params) Repo.insert!(user) end |