Hi

I am using Password Reset Landing Page module, so anonymous user uses the registration form to enter their email. Then the system sends email with a link to a form where they can set their passwords for the first time. Password policies does not apply on this form.
Also, password policies do not apply on the password reset form.

Password policies only apply in the user/edit page.

Any idea?

thanks

Comments

Sarahphp1 created an issue. See original summary.

jitesh doshi’s picture

Hello maintainers,

I'm the maintainer for Password Reset Landing Page (PRLP) module. The requester here had created the same issue in PRLP queue. But the issue can only be fixed in this module. Mainly, you have to implement hook_form_alter for $form_id == 'user_pass_reset', and also make sure the order of handlers is correct.

Please feel free to reach out to me for any changes I need to make to PRLP module in order to make your changes work.

Thanks --Jitesh

0sarah0al’s picture

Thanks alot Jitesh
appreciate it..

vimalabhi89’s picture

any luck with this? I have the same problem

abhisekmazumdar’s picture

Assigned: Unassigned » abhisekmazumdar

I'm working on a patch for this issue.

abhisekmazumdar’s picture

Assigned: abhisekmazumdar » Unassigned
perarg’s picture

I am trying to figure out a workaround here. Both modules are using hook_form_FORM_ID_alter(). As we read here: API hook_form_alter
"The call order is as follows: all existing form alter functions are called for module A, then all for module B, etc., followed by all for any base theme(s), and finally for the theme itself. The module order is determined by system weight, then by module name."

The PRLP module is latter than PASSWORD_POLICY module, as it is based in alphabetical order. (We suppose that we haven't alter the order by any way)

@Jitesh Doshi you propose to focus at hook_form_alter but calling the hook in password_policy module the $form doesn't have the password_confirmation field yet. The reason is the above about call order.

What may be the optimal way to approach this ?
Go to prlp module, check if password_policy is enabled and try to call password_policy module's functions ?
Make password_policy to be called latest (i don't know if it is supported by drupal) and make changes in it's hook ?

vacho’s picture

I think this will be fixed at this issue https://www.drupal.org/project/password_policy/issues/3078741

vacho’s picture

jcnventura’s picture

Status: Active » Needs review
StatusFileSize
new694 bytes

@vacho, I think it's better to keep the two issues separate. Let's deal with the prlp integration here.

andypost’s picture

Status: Needs review » Needs work

++ to keep scope

NW for update hook to change weight

jcnventura’s picture

Status: Needs work » Needs review
StatusFileSize
new822 bytes
new1 KB

Update hook added.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Looks ready, thank you 👍

ultimike’s picture

Applies cleanly to 3.x-dev, looks good-to-go.

-mike

nerdstein’s picture

I've reviewed and this seems fine. I have merged some other patches, can I get a reroll please?

jcnventura’s picture

StatusFileSize
new1.02 KB

Re-roll as requested. No interdiff, as there's no actual change other than context.

paulocs’s picture

Version: 8.x-3.0-alpha4 » 8.x-3.x-dev

RTBC +1

nerdstein’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

This looks good as defined in #16 - ill merge this in and we can retest

  • nerdstein committed d25a5c2 on 8.x-3.x authored by jcnventura
    Issue #2943105 by jcnventura, 0Sarah0Al, abhisekmazumdar, andypost,...
nerdstein’s picture

Status: Patch (to be ported) » Fixed

Good to go! Thanks, all.

Status: Fixed » Closed (fixed)

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