Allow to change an user's password through the users.modify mix task

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-04 17:38:37 +02:00
parent 4c66162e7e
commit 5dd24e1c9e
3 changed files with 19 additions and 0 deletions

View File

@@ -107,6 +107,7 @@ defmodule Mobilizon.Users.User do
|> validate_required(@required_attrs)
|> unique_constraint(:email, message: dgettext("errors", "This email is already used."))
|> Checker.validate_changeset()
|> hash_password()
|> validate_length(:password,
min: 6,
max: 200,