mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Add email and generate-password options in user:add
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
This commit is contained in:
committed by
backportbot[bot]
parent
5587156ec3
commit
ed99ff2e08
@@ -1360,7 +1360,7 @@ report showing how many users you have, and when a user was last logged in::
|
||||
You can create a new user with their display name, login name, and any group
|
||||
memberships with the ``user:add`` command. The syntax is::
|
||||
|
||||
user:add [--password-from-env] [--display-name[="..."]] [-g|--group[="..."]]
|
||||
user:add [--password-from-env] [--generate-password] [--display-name[="..."]] [-g|--group[="..."]] [--email EMAIL]
|
||||
uid
|
||||
|
||||
The ``display-name`` corresponds to the **Full Name** on the Users page in your
|
||||
@@ -1411,6 +1411,26 @@ You may also use ``password-from-env`` to reset passwords::
|
||||
layla'
|
||||
Successfully reset password for layla
|
||||
|
||||
``generate-password`` allows you to set a securely generated password for the user.
|
||||
This is never shown in the output and can be used to create users with temporary
|
||||
passwords. This can be used in conjunction with the ``email`` option to create
|
||||
users with a temporary password and send a welcome email to the user's email
|
||||
address without user interaction::
|
||||
|
||||
sudo -u www-data php occ user:add layla --generate-password --email layla@example.tld
|
||||
The account "layla" was created successfully
|
||||
Welcome email sent to layla@example.tld
|
||||
|
||||
The ``email`` option allows you to set the user's email address when creating
|
||||
the user. A welcome email will be sent to the user's email address if
|
||||
``newUser.sendEmail`` is set to ``yes`` in ``core``'s app config or not set at all::
|
||||
|
||||
sudo -u www-data php occ user:add layla --email layla@example.tld
|
||||
Enter password:
|
||||
Confirm password:
|
||||
The account "layla" was created successfully
|
||||
Welcome email sent to layla@example.tld
|
||||
|
||||
You can delete users::
|
||||
|
||||
sudo -u www-data php occ user:delete fred
|
||||
|
||||
Reference in New Issue
Block a user