@@ -1360,7 +1360,7 @@ report showing how many users you have, and when a user was last logged in::
13601360You can create a new user with their display name, login name, and any group
13611361memberships with the ``user:add `` command. The syntax is::
13621362
1363- user:add [--password-from-env] [--display-name[="..."]] [-g|--group[="..."]]
1363+ user:add [--password-from-env] [--generate-password] [-- display-name[="..."]] [-g|--group[="..."]] [--email EMAIL ]
13641364 uid
13651365
13661366The ``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::
14111411 layla'
14121412 Successfully reset password for layla
14131413
1414+ ``generate-password `` allows you to set a securely generated password for the user.
1415+ This is never shown in the output and can be used to create users with temporary
1416+ passwords. This can be used in conjunction with the ``email `` option to create
1417+ users with a temporary password and send a welcome email to the user's email
1418+ address without user interaction::
1419+
1420+ sudo -u www-data php occ user:add layla --generate-password --email layla@example.tld
1421+ The account "layla" was created successfully
1422+ Welcome email sent to layla@example.tld
1423+
1424+ The ``email `` option allows you to set the user's email address when creating
1425+ the user. A welcome email will be sent to the user's email address if
1426+ ``newUser.sendEmail `` is set to ``yes `` in ``core ``'s app config or not set at all::
1427+
1428+ sudo -u www-data php occ user:add layla --email layla@example.tld
1429+ Enter password:
1430+ Confirm password:
1431+ The account "layla" was created successfully
1432+ Welcome email sent to layla@example.tld
1433+
14141434You can delete users::
14151435
14161436 sudo -u www-data php occ user:delete fred
0 commit comments