#105878Running bin/typo3 backend:user:create admin or maintainer options cannot be negated
Description
if you run Running bin/typo3 backend:user:create —admin=n
You get `The “—admin” option does not accept a value. `
However the standard symfony negation
bin/typo3 backend:user:create —no-admin
does also not work.
Therefore it is not possible to run the command to explicitly create a non-admin without interaction
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
Lina Wolf changed category <span data-processor="relativetime" data-value="2025-01-03T11:36:05+00:00" > 01/03/25, 11:36 </span>
-
Garvin Hicking changed description <span data-processor="relativetime" data-value="2025-01-03T13:04:45+00:00" > 01/03/25, 13:04 </span>
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-01-03T13:08:49+00:00" > 01/03/25, 13:08 </span> -
Lina Wolf commented <span data-processor="relativetime" data-value="2025-01-04T08:09:34+00:00" > 01/04/25, 08:09 </span>
Not setting —admin and —maintainer leads to the user beeing prompted. What I want is an explicit no for these options.
I can then create a command where the user is prompted for a password but not asked weather he wants to be an admin.
Using Input option `InputOption::VALUE_NEGATABLE` instead of `InputOption::VALUE_NONE` could achieve this.
-
Lina Wolf commented <span data-processor="relativetime" data-value="2025-01-04T09:03:01+00:00" > 01/04/25, 09:03 </span>
It can indeed be solved by using the no interaction option combined with not setting these flags:
typo3 backend:user:create --username=e.doe --groups=1 --email=e.doe@example.org --no-interaction
-
Lina Wolf changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-01-04T09:03:12+00:00" > 01/04/25, 09:03 </span>
This works for me:
./vendor/bin/typo3 backend:user:create —username=somebody —password=SomePassWord-123 —email=someone@example.com —no-interaction
Because “—admin” and “—maintainer” are activated flags, simply not specifying them disables them.
Could you maybe elaborate? Maybe using the ENV vars “TYPO3_BE_USER_ADMIN=0 TYPO3_BE_USER_MAINTAINER=0” could also help you