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.

Comments

franz’s picture

Which 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.

erikwebb’s picture

Now that the blocking issue is resolved, what are the next steps here?

franz’s picture

StatusFileSize
new848 bytes

how 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.

erikwebb’s picture

Status: Needs work » Needs review
franz’s picture

Status: Needs review » Needs work

Actually the patch doesn't fix it, but merely exposed the code that has the other issues.

erikwebb’s picture

This 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.

franz’s picture

No. 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.

erikwebb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.25 KB

This patch seems to fix the problem for me. Could you please explain exactly where you are seeing the issues?

erikwebb’s picture

Sorry, that patch had some unrelated fixes.

franz’s picture

The 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)

erikwebb’s picture

I agree. Does this patch fix the problem for you?

erikwebb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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