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 commentedComment #2
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 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 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 commentedCommitted!
http://drupalcode.org/project/password_policy.git/commit/8da4aed
Comment #11
roysegall commentedI know it's perfect :) i just don't understand why in #4 it failed and on #7 it's failed.
Comment #13
user654 commented.
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 commentedComment #21
corwino commentedHere's an up-to-date patch to be able to select the 'Anonymous' role when creating a policy.