diff options
author | dtluna <dtluna@openmailbox.org> | 2017-04-16 17:12:28 +0300 |
---|---|---|
committer | dtluna <dtluna@openmailbox.org> | 2017-04-16 17:12:28 +0300 |
commit | 82914e1e4de37747653c83644b428c1ba29428c9 (patch) | |
tree | 0688c91826f16ba428a9cea7a25a74ed2ae19e1d /lib/mix/tasks | |
parent | 594dd01ab2864482d8c1cdb0153d7b4b0972b3b4 (diff) | |
parent | e158e32124a62f2c93a8910bf3edc4519c4a13e6 (diff) | |
download | pleroma-82914e1e4de37747653c83644b428c1ba29428c9.tar.gz |
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/follow-by-screen-name
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 |