aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
authordtluna <dtluna@openmailbox.org>2017-04-16 13:28:23 +0300
committerdtluna <dtluna@openmailbox.org>2017-04-16 13:28:23 +0300
commit9a8c348aed7772c9e2173163687e63943cf491fb (patch)
treefa1317a374e309e667beabd240c41003e2f6fdbb /lib/mix/tasks
parentc0e5b3459fa7c53abf6969584b3298184e0094bd (diff)
parentb179b3413e7dbdafbe8a3839ba7719b9eb2a582d (diff)
downloadpleroma-9a8c348aed7772c9e2173163687e63943cf491fb.tar.gz
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/unfollow-by-screen-name
Diffstat (limited to 'lib/mix/tasks')
-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