Skip to content

Commit b00e412

Browse files
committed
add email option in occ user:add
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent acf3b81 commit b00e412

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

admin_manual/configuration_server/occ_command.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ report showing how many users you have, and when a user was last logged in::
12911291
You can create a new user with their display name, login name, and any group
12921292
memberships with the ``user:add`` command. The syntax is::
12931293

1294-
user:add [--password-from-env] [--display-name[="..."]] [-g|--group[="..."]]
1294+
user:add [--password-from-env] [--display-name[="..."]] [-g|--group[="..."]] [--email EMAIL]
12951295
uid
12961296

12971297
The ``display-name`` corresponds to the **Full Name** on the Users page in your
@@ -1342,6 +1342,20 @@ You may also use ``password-from-env`` to reset passwords::
13421342
layla'
13431343
Successfully reset password for layla
13441344

1345+
The ``email`` option allows you to set the user's email address when creating
1346+
the user. This can be used in conjunction with the ``password-from-env`` option
1347+
to create users with a password from the environment variables and email address
1348+
from the command line.
1349+
1350+
In the case you don't provide the ``password-from-env`` option, the command will
1351+
auto generate a temporary password and send a link to to the user's email
1352+
address to set a new password::
1353+
1354+
sudo -u www-data php occ user:add layla --email layla@example.tld
1355+
Setting a temporary password.
1356+
The user "layla" was created successfully
1357+
Invitation E-Mail sent to layla@example.tld
1358+
13451359
You can delete users::
13461360

13471361
sudo -u www-data php occ user:delete fred

0 commit comments

Comments
 (0)