Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When i try to use the module for anonymous users i can see that the password policy is not applied when anonymous user try to register.
I'm attaching a patch that handle it.
Comment | File | Size | Author |
---|---|---|---|
#21 | password_policy-anonymous_role_selection-2041717-21.patch | 820 bytes | corwino |
#17 | 2041717-allow_anon-17.patch | 622 bytes | tanc |
#15 | 2041717-allow_anon-15.patch | 806 bytes | tanc |
#7 | 2041717-policy-anonymous-users-5.patch | 4.74 KB | coltrane |
#1 | password-policy-anonymous-users.patch | 739 bytes | RoySegall |
Comments
Comment #1
RoySegall CreditAttribution: RoySegall commentedComment #2
hefox CreditAttribution: hefox commentedWonder if it'd be better to instead do an it on the element basis (e.g. add a process to 'pass' element?
Comment #3
hefox CreditAttribution: hefox commenteddoesn't work with creating new users either, patch fixes that
Comment #4
coltraneUpdated patch with a simpletest.
Comment #7
coltraneUpdated patch handles exception.
Comment #8
RoySegall CreditAttribution: RoySegall commented@coltrane What's different?
Comment #9
coltrane#4 adds a simpletest test for user registration and #7 handles an exception which you can see on the simpletest run results at https://qa.drupal.org/pifr/test/678473
Edit, so your patch is perfect, this just adds a test to confirm it :)
Comment #10
erikwebb CreditAttribution: erikwebb commentedCommitted!
http://drupalcode.org/project/password_policy.git/commit/8da4aed
Comment #11
RoySegall CreditAttribution: RoySegall commentedI know it's perfect :) i just don't understand why in #4 it failed and on #7 it's failed.
Comment #13
pinkonomy CreditAttribution: pinkonomy commentedI used the 7.x-2.x-dev of this module but I cannot see under roles the anonymous user.
Am I missing something?
thanks
Comment #14
tancI have the same problem as pinkonomy, there is no option to apply the policy to the anonymous user, so I think the policy would only trigger if you don't have any roles selected (which would then apply it to all roles including anonymous).
Comment #15
tancThe simple solution is to allow anonymous users when loading the options form in password_policy_role_admin_form. Attached is a patch which does this.
Comment #17
tancAdding a new patch that should apply fine, last one was from the wrong directory.
Comment #18
tancComment #19
deekayen CreditAttribution: deekayen commentedComment #21
corwino CreditAttribution: corwino at Watch Dreamer SA commentedHere's an up-to-date patch to be able to select the 'Anonymous' role when creating a policy.