Or it seems so. This patch is only to demonstrate the code was note being run due to a check failing at the beginning of the function. Now it generates an error for the arguments of db_query_range(). Although this module is in beta, the whole login checks for expiration are NOT WORKING.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | password_policy-hook_user_login-1410172-9.patch | 1.61 KB | erikwebb |
| #8 | password_policy-hook_user_login-1410172-8.patch | 2.25 KB | erikwebb |
| #3 | password_policy-user_login.patch | 848 bytes | franz |
Comments
Comment #1
franzWhich means:
a) If cron doens't run, functionality is broken.
b) Because of #1410164: Cron run doesn't not respect password_policy_block variable, this settings is never used at all, expired users are always blocked.
Comment #2
erikwebb commentedNow that the blocking issue is resolved, what are the next steps here?
Comment #3
franzhow stupid of me, I forgot the patch. There is a simple mistake on the first if(). This was causing it fo fail all the time and the code inside is never executed. However, the code has wrong usages of db_query_range() that also causes errors, so it needs a major re-work.
Comment #4
erikwebb commentedComment #5
franzActually the patch doesn't fix it, but merely exposed the code that has the other issues.
Comment #6
erikwebb commentedThis patch seems to fix the issues specific to hook_user_login(). I certainly know there are other issues at the moment, but doesn't the patch resolve this issue.
Comment #7
franzNo. The patch only "enables" the code inside the if() statement, which was never being executed before. The patch actually just exposes the bugged code - at least the db_query_range() calls are wrong, as I said in #3.
Comment #8
erikwebb commentedThis patch seems to fix the problem for me. Could you please explain exactly where you are seeing the issues?
Comment #9
erikwebb commentedSorry, that patch had some unrelated fixes.
Comment #10
franzThe funcionality of running the policies on user login was broken. Testing this involves testing if a policy is correctly applied being triggered by a user_login (rather than a cron run)
Comment #11
erikwebb commentedI agree. Does this patch fix the problem for you?
Comment #12
erikwebb commentedFixed and committed.
http://drupalcode.org/project/password_policy.git/commit/d9d7bf3