I'm not 100% sure that this is the bug, but it seems like it's what happened.

1. Created a new user with a role that expires after 90 days
2. Ran cron
3. User was blocked

Comments

greggles created an issue. See original summary.

greggles’s picture

Title: Don't expire brand new users who have never logged in » Handle users who have never logged in

Also, if they don't log in for 90 days (or whatever the expiry is) then it should block them.

greggles’s picture

Status: Active » Needs review
StatusFileSize
new1.59 KB

Here's the tests only, this should fail.

greggles’s picture

StatusFileSize
new3.03 KB

Tests and the fix.

The last submitted patch, 3: 2606682_expire_never_login_tests.patch, failed testing.

btmash’s picture

Status: Needs review » Needs work

I had a chance to review this and outside of the one nitpick, this looks good.

+++ b/user_expire.module
@@ -406,12 +406,29 @@ function user_expire_find_users_to_expire_by_role($role_id, $seconds_since_login
+  // ((u.access <= 1439081220 AND u.access > 0) OR (u.access = 0 AND u.created < 1439081220))

Seems this line can be removed?

greggles’s picture

Status: Needs work » Needs review
StatusFileSize
new3.06 KB

Good catch :)

I also made the commenting a bit more consistent.

greggles’s picture

Status: Needs review » Fixed

Alrighty, fixed now.

  • greggles committed 749ff97 on
    Issue #2606682 by greggles, BTMash: Handle users who have never logged...

Status: Fixed » Closed (fixed)

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