22
33## Summary
44
5- The ` admin:create-admin ` CLI command creates an administrator account from the command line, taking an identity, a password and a first and last name.
5+ The ` admin:create ` CLI command creates an administrator account from the command line, taking an identity, a password and a first and last name.
66Accounts created this way always receive the ` admin ` role.
77
88## Usage
99
1010Run the following command in your application’s root directory:
1111
1212``` shell
13- php ./bin/cli.php admin:create-admin -i {IDENTITY} -p {PASSWORD} -f {FIRST_NAME} -l {LAST_NAME}
13+ php ./bin/cli.php admin:create -i {IDENTITY} -p {PASSWORD} -f {FIRST_NAME} -l {LAST_NAME}
1414```
1515
1616OR
1717
1818``` shell
19- php ./bin/cli.php admin:create-admin --identity {IDENTITY} --password {PASSWORD} --firstName {FIRST_NAME} --lastName {LAST_NAME}
19+ php ./bin/cli.php admin:create --identity {IDENTITY} --password {PASSWORD} --firstName {FIRST_NAME} --lastName {LAST_NAME}
20+ ```
21+
22+ OR
23+
24+ ``` shell
25+ php ./bin/cli.php admin:create --identity={IDENTITY} --password={PASSWORD} --firstName={FIRST_NAME} --lastName={LAST_NAME}
2026```
2127
2228after replacing:
@@ -30,9 +36,14 @@ after replacing:
3036If the submitted data is valid, the outputted response is:
3137
3238``` text
33- Admin account has been created.
39+
40+ [INFO] Admin created successfully.
41+
3442```
3543
44+ All four options are required.
45+ If any is missing or invalid, the command fails with the input filter's validation messages instead, one per line.
46+
3647The new admin account is ready to use.
3748
3849You can get more help with this command by running:
@@ -63,7 +74,8 @@ A: Yes.
6374
6475** Q: How do I know the account was created?**
6576
66- A: The command prints ` Admin account has been created. ` and the account is immediately usable.
77+ A: The command prints ` [INFO] Admin created successfully. ` and the account is immediately usable.
78+ Anything else — a list of field messages — means validation failed and no account was created.
6779
6880** Q: Where do I see the full command help?**
6981
0 commit comments