Auto Unblock User after specified time

Created on 19 February 2023, over 1 year ago
Updated 1 June 2023, over 1 year ago

Problem/Motivation

I want blocked user to be unblocked after a time I can specify in configuration. Currently there is not such option, once user is blocked I have to manually unblock that user.

Proposed resolution

Add an option for defining time at which user get unblocked.

Remaining tasks

Creating the feature

User interface changes

Add Field to define time.

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇳India divyansh

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

Comments & Activities

  • Issue created by @divyansh
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India divyansh

    Hi, I have created the following patch, that will fullfill the feature request, more things can be added to it, as per requirement. Please review it.

  • The last submitted patch, 2: 3342951-1.patch, failed testing. View results
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • Status changed to Needs work over 1 year ago
  • 🇮🇳India divyansh

    Hi, I have added the patch, without any test.

    Please someone write the test cases for this patch.

    Thank you

  • 🇵🇰Pakistan usmanjutt84 Islamabad

    @divyansh, I am also trying to create similar functionality using Auto Unblock Users module.

  • 🇺🇸United States jsutta United States

    Hi @divyansh,

    I've made a couple adjustments to your patch to add an optional message to be displayed to the user if their account is locked out. For the site I'm currently working on, we have to be able to:

    1. Lock a user account after a configurable number of attempts
    2. Unlock it after a configurable amount of time
    3. Display a message to the user in case their account is locked. (I know this part isn't necessarily best practice, but that's our requirement.)

    I've attached my version of the patch to this comment in case you want to incorporate it or in case anyone else needs it. If it fails automated testing I'll do my best to fix them.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    Patch Failed to Apply
  • 🇺🇸United States jsutta United States

    Rerolled the patch from #6 against the latest dev branch after I saw the tests couldn't be done because the patch wouldn't apply. Hopefully this one works!

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass, 6 fail
  • 🇺🇸United States jsutta United States

    I've been doing some more work on this. I found that because my first patch (#6) was developed against version 2.0.1, it wouldn't apply to the latest 2.x-dev branch. I've developed and completed functional testing on two new patches:

    • 3342951-8-2.0.1.patch: Developed against the module's 2.0.1 tag. Applies cleanly and functional testing completed.
    • 3342951-8-2.x.patch: Developed against the 2.x-dev branch. Applies cleanly and functional testing completed.

    As soon as I have time I'll circle back around to the unit testing.

Production build 0.71.5 2024