prevent inactive users being blocked immediately after being unblocked

Created on 21 December 2022, almost 2 years ago
Updated 16 January 2024, 10 months ago

Problem/Motivation

User blocking happens every time cron is run which on our sites is hourly with a random offset per site. When a user is blocked we may unblock them, but this could be at any time with an unknown amount of time between then and the next cron, if they do not log in before the next cron they will be re-blocked.

It would be preferable if there were a minimum time we could set to ensure the user has a reasonable amount of time to log in to their account.

Steps to reproduce

  1. Have a user who is blocked and inactive
  2. Unblock the user
  3. Run drupal cron
  4. User is blocked

Proposed resolution

Store the timestamp of the last time a user was unblocked. Add a config setting to specify a minimum window of time. Add an additional condition check to block_inactive_users() to prevent the user being blocked if still within window.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

2.4

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024