Provide any parameters during the initial call bin/plugin login new-user
Expected behavior:
All "required" fields should prompt and not skip during account creation, unless that parameter is provided during the initial cli command.
Observed behavior:
title field is skipped and defaults to null
state field is skipped and defaults to enabled
I believe the behavior is resulting from the second part of each conditional:
if (!$this->options['title'] && !count(array_filter($this->options))) {
and
if (!$this->options['state'] && !count(array_filter($this->options))) {
Proposed fix:
Remove the second conditional of the counting of the options passed into the cli command.
Possible bug during account creation via the CLI.
To reproduce:
Provide any parameters during the initial call
bin/plugin login new-user
Expected behavior:
All "required" fields should prompt and not skip during account creation, unless that parameter is provided during the initial cli command.
Observed behavior:
title
field is skipped and defaults tonull
state
field is skipped and defaults toenabled
I believe the behavior is resulting from the second part of each conditional:
if (!$this->options['title'] && !count(array_filter($this->options))) {
andif (!$this->options['state'] && !count(array_filter($this->options))) {
Proposed fix:
Remove the second conditional of the counting of the options passed into the cli command.