getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Title and state user attributes skipped during user creation #281

Open jgonyea opened 2 years ago

jgonyea commented 2 years ago

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:

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.