aboutsummaryrefslogtreecommitdiff
path: root/lib/mix
diff options
context:
space:
mode:
authordtluna <dtluna@openmailbox.org>2017-04-16 13:32:56 +0300
committerdtluna <dtluna@openmailbox.org>2017-04-16 13:32:56 +0300
commit7a0046d1271d97d635294ee0cace135d32b141ba (patch)
tree0e5d18d2952e7299ddfa093ccf4eb523e8b72c11 /lib/mix
parent18cd04ade576969b25e96733dddb8255fbf13a6d (diff)
parentb179b3413e7dbdafbe8a3839ba7719b9eb2a582d (diff)
downloadpleroma-7a0046d1271d97d635294ee0cace135d32b141ba.tar.gz
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/user-timeline
Diffstat (limited to 'lib/mix')
-rw-r--r--lib/mix/tasks/register_user.ex8
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