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
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | password_policy-prlp-2943105-16.patch | 1.02 KB | jcnventura |
Comments
Comment #2
jitesh doshi commentedHello 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
Comment #3
0sarah0al commentedThanks alot Jitesh
appreciate it..
Comment #4
vimalabhi89 commentedany luck with this? I have the same problem
Comment #5
abhisekmazumdarI'm working on a patch for this issue.
Comment #6
abhisekmazumdarComment #7
perarg commentedI 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 ?
Comment #8
vacho commentedI think this will be fixed at this issue https://www.drupal.org/project/password_policy/issues/3078741
Comment #9
vacho commentedComment #10
jcnventura@vacho, I think it's better to keep the two issues separate. Let's deal with the prlp integration here.
Comment #11
andypost++ to keep scope
NW for update hook to change weight
Comment #12
jcnventuraUpdate hook added.
Comment #13
andypostLooks ready, thank you 👍
Comment #14
ultimikeApplies cleanly to 3.x-dev, looks good-to-go.
-mike
Comment #15
nerdsteinI've reviewed and this seems fine. I have merged some other patches, can I get a reroll please?
Comment #16
jcnventuraRe-roll as requested. No interdiff, as there's no actual change other than context.
Comment #17
paulocsRTBC +1
Comment #18
nerdsteinThis looks good as defined in #16 - ill merge this in and we can retest
Comment #20
nerdsteinGood to go! Thanks, all.