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.

Comments

divyansh created an issue. See original summary.

divyansh’s picture

Status: Active » Needs review
StatusFileSize
new6.09 KB

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.

Status: Needs review » Needs work

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

divyansh’s picture

StatusFileSize
new6.09 KB

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

Please someone write the test cases for this patch.

Thank you

usmanjutt84’s picture

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

jsutta’s picture

StatusFileSize
new16.23 KB

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.

jsutta’s picture

StatusFileSize
new15.54 KB

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!

jsutta’s picture

StatusFileSize
new16.03 KB
new15.99 KB

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.