Documentation for creating users appears to be incorrect / lacking
In both the stable & develop documentation, the mix task shown suggests one can create a user just by kicking off the process with an email address:
mix pleroma.user new []
This doesn't work with a single argument of an email address, nor of a single argument of just a user name, the results of doing so look like:
mix pleroma.user new test@test.com ** (FunctionClauseError) no function clause matching in Mix.Tasks.Pleroma.User.run/1
The following arguments were given to Mix.Tasks.Pleroma.User.run/1:
# 1
["new", "test@test.com"]
Attempted function clauses (showing 10 out of 16):
def run(["new", nickname, email | rest])
def run(["rm", nickname])
def run(["toggle_activated", nickname])
def run(["reset_password", nickname])
def run(["unsubscribe", nickname])
def run(["unsubscribe_all_from_instance", instance])
def run(["set", nickname | rest])
def run(["tag", nickname | tags])
def run(["untag", nickname | tags])
def run(["invite" | rest])
...
(6 clauses not shown)
lib/mix/tasks/pleroma/user.ex:15: Mix.Tasks.Pleroma.User.run/1
(mix 1.10.2) lib/mix/task.ex:330: Mix.Task.run_task/3
(mix 1.10.2) lib/mix/cli.ex:82: Mix.CLI.run_task/2
(elixir 1.10.2) lib/code.ex:917: Code.require_file/2
Adding in the --name function seems to cause weird parsing options:
mix pleroma.user new --name test A user will be created with the following information:
- nickname: --name
- email: test
- password: [generated; a reset link will be created]
- name: --name
- bio:
- moderator: false
- admin: false
Adding in a potential username argument doesn't help:
mix pleroma.user new test --name test ** (MatchError) no match of right hand side value: {[], ["test"], []} lib/mix/tasks/pleroma/user.ex:16: Mix.Tasks.Pleroma.User.run/1 (mix 1.10.2) lib/mix/task.ex:330: Mix.Task.run_task/3 (mix 1.10.2) lib/mix/cli.ex:82: Mix.CLI.run_task/2 (elixir 1.10.2) lib/code.ex:917: Code.require_file/2
It appears the format has to be similar to:
MIX_ENV=prod mix pleroma.user new test test@test.com A user will be created with the following information:
- nickname: test
- email: test@test.com
- password: [generated; a reset link will be created]
- name: test
- bio:
- moderator: false
- admin: false