Selecting specific roles for password reset throws a There are no users with the selected role error.

Comments

edwardchiapet created an issue. See original summary.

edwardchiapet’s picture

This patch should resolve the errors.

uids was being set in submitForm() ($form_state->set('uids', $uids)), so $form_state->getValue('uids') in validateForm() will always be false, and will always throw the form error.

The patch moves the logic into validateForm() to validate the values and retrieves those values in submitForm().

Also, fixed some code formatting per PHP code sniffer.

edwardchiapet’s picture

Status: Active » Needs review
edwardchiapet’s picture

Assigned: edwardchiapet » Unassigned

  • shrop committed 12fd9ff on 8.x-1.x authored by edwardchiapet
    Issue #2855808 by edwardchiapet: Role-specific reset throws "There are...
shrop’s picture

Status: Needs review » Fixed

Reviewed, committed, and new alpha released! https://www.drupal.org/project/mass_pwreset/releases/8.x-1.0-alpha4

Thank you, @edwardchiapet

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.