When a user initiates a password reset batch, and that user is included in the reset, the batch fails near the end of the batch process.

The error message is "No active branch"

Batch failure

This happens in the 7.x and 8.x versions. I have created a separate ticket for the 8.x branch.

Probably best to remove the current admin user's uid from the list of resets.

Comments

mikebarkas created an issue. See original summary.

damienmckenna’s picture

Assigned: mikebarkas » Unassigned

Thanks for reporting the bug.

BTW please note that the "Assigned" field is for when you are specifically working on an issue, if you're not then you should just leave it as "unassigned".

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new4.75 KB

This patch skips the current user and adds a note to hook_help() explaining the limitation.

damienmckenna’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
damienmckenna’s picture

StatusFileSize
new4.75 KB

Minor fix ($account was used instead of $user).

laryn’s picture

StatusFileSize
new4.75 KB

I used a variation of the patch in #5 in the Backdrop version. I think it will need a few minor tweaks to work here -- see if this looks right (attached and changes summarized below).

if ($user->uid > 0 && $i == $user->uid) {

I think this should be:

if ($user->uid > 0 && $data['uids'][$i] == $user->uid) {

Also, there were a few spots like this:

t('Skipped logged in user %user', array('%mail' => $user->name));

I've changed them to match up better:

t('Skipped logged in user %name', array('%name' => $user->name));

mikebarkas’s picture

Status: Needs review » Closed (outdated)

Closing as outdated: the 7.x-1.x and 8.x-1.x branches are end-of-life and no longer supported.
In 2.x, the current user and uid 1 are excluded from the reset.

If you can reproduce this on 2.x, please reopen with steps and set the version to 2.x-dev.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.