Write a drush command to process mass password resets

Comments

steven jones’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new3.52 KB

Here's a Drush command that adds the password reset functionality.

charles belov’s picture

@Steven Jones: In the patch on #1, is the change to mass_pwreset.module necessary in order for the Drush command to work, or is it something separate that you noticed?

steven jones’s picture

Well, it's a little enhancement so that you can reset the passwords for all roles, not just a specific set of roles.

charles belov’s picture

Ah, but wouldn't all roles be the same as resetting the password for everyone?

steven jones’s picture

Sorry, what I mean is it allows resetting the password for users, and not filtering by role, i.e. doing it for everyone.

charles belov’s picture

Unless its absence prevents your Drush change from working, perhaps it is a separate issue requiring a separate patch.

That is, if the module maintainer wants to implement your Drush improvement but not the change to the base module, that would block your patch from being used.

I ask because I tried your patch and while the Drush side worked, the admin pages version didn't. I plan to test the current dev version without your patch to see if it works on my website, to see whether the failure to work a side effect of your patch, but haven't had a chance to do so yet.

charles belov’s picture

Verified that the fail happens without your patch, and will file an issue for that. That said, I wouldn't be comfortable using this patch when I can't verify that it does no harm to the admin UI, something that I could do if the only thing the patch did was to add the drush file.

damienmckenna’s picture

Status: Needs review » Needs work

This should leverage the existing logic, possibly refactoring it, rather than duplicating the code.

colan’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

This should go into D8+ first.