Tony Murray a4b79d3339 lnms user:add command (#9830)
* Add lnms user:add command
Uses events to mark past notifications as read (even for non-manually added users)

* Filter out previous options from auto-completion

* use validation to check cli input

* Warn if using other auth

* abstract LnmsCommand

* Use setPassword helper for hashing instead of mutator

* Extract validation function
2019-02-15 09:00:07 -06:00

21 lines
833 B
PHP

<?php
return [
'user:add' => [
'description' => 'Add a local user, you can only log in with this user if auth is set to mysql',
'arguments' => [
'username' => 'The username the user will log in with',
],
'options' => [
'descr' => 'User description',
'email' => 'Email to use for the user',
'password' => 'Password for the user, if not given, you will be prompted',
'full-name' => 'Full name for the user',
'role' => 'Set the user to the desired role :roles',
],
'password-request' => "Please enter the user's password",
'success' => 'Successfully added user: :username',
'wrong-auth' => 'Warning! You will not be able to log in with this user because you are not using MySQL auth',
],
];