If the tfa and tfa_basic modules are in use on a site alongside the legal module and tfa is enabled for a role and a user with that role who has already set up their tfa access tries to reset their password they will receive an access denied error on a password reset instead of being prompted for their tfa code after agreeing to the Terms & Conditions from legal.

This issue seems to be closely related to: https://www.drupal.org/project/legal/issues/1644018 but I am unsure how to fix that issue for the time being and am proposing a work around for this specific use case: the option to bypass the Terms & Conditions displayed from legal on password resets.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JayDarnell created an issue. See original summary.

JayDarnell’s picture

Issue summary: View changes
JayDarnell’s picture

Potential patch to bypass legal Terms and Conditions for password resets:

JayDarnell’s picture

Fixed an issue: missing strict comparison and moved logic for password reset bypass into a separate function for readability:

swirt’s picture

Status: Active » Needs review
apaderno’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
helmo’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, this patch worked just great.