The current module is only about flood settings. It would be useful to have actions on the flood table entries, probably as a VBO action on a view of the floods.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

breidert’s picture

I would like this, too, my clients like to forget their passwords :-)

stefank’s picture

Got a custom module with view and Vbo. For any help let me know. Might upload it to github as well.

attiks’s picture

#2 any chance you can upload it somewhere, will save me the time of writing it ;-)

stefank’s picture

StatusFileSize
new7.14 KB

Hi

Sorry for the late reply. Providing an extra module. This module is a extension for flood_control module.
The zip file also contains a text file with exported view to manage user flood.
In the flood control tick the checkbox - Failed login (username only)- the module already contains the patch http://drupal.org/node/1825544.
In the view fields click the Bulk operations: User (User) | enable the unflood vbo.

For any enquiries please let me know.
Enjoy

zterry95’s picture

https://drupal.org/project/flood_unblock

Maybe this module can do the things.

stefank’s picture

At the moment it can not. With the flood_unblock you can empty the flood table. This is all what it does.

crystaldawn’s picture

Issue summary: View changes

The cbp module does this by way of deleting a blocked IP OR by setting a whitelist on an IP which you could then simply remove. It also has other features though, but it does have this functionality. It also clears the flood entries for a user if they use a "reset/one-time login" link as well. Oh, and it also uses this module as a dependency as well for the actual flood settings themselves since it does a good enough job with that.

heddn’s picture

So this doesn't get lost, here's my attempt to get a working filter. It didn't work. Maybe someone else can add the remaining parts, or maybe it isn't possible...

ERROR:

SQLSTATE[42000]: Syntax error or access violation: 1056 Can't group on 'flood_locked'
SELECT DISTINCT users.uid AS uid, users.name AS users_name, users.status AS users_status, users.created AS users_created, users.access AS users_access, flood.event AS flood_event, flood.identifier AS flood_identifier, COUNT(flood.identifier AND flood.timestamp > 1428607022) AS flood_locked
FROM 
{users} users
LEFT JOIN {flood} flood ON users.uid = flood.identifier
GROUP BY flood_locked, uid
HAVING (( (flood_locked < 3) ))
    $data['flood']['locked'] = array(
      'title' => t('Flood locked'),
      'help' => t('Whether or not a user is flood locked.'),
      'field' => array(
        'handler' => 'views_handler_field_flood_control_locked',
        'click sortable' => TRUE,
      ),
      'filter' => array(
        'handler' => 'views_handler_filter_flood_control_locked',
        'use equal' => 'FALSE',
      ),
      'sort' => array(
        'handler' => 'views_handler_sort',
      ),
    );
/**
 * @file
 * Definition of views_handler_filter_flood_control_locked.
 */

/**
 * Class views_handler_filter_flood_control_locked.
 */
class views_handler_filter_flood_control_locked extends views_handler_filter_boolean_operator {
  function query() {
    $this->ensure_my_table();

    // COUNT(flood.identifier AND flood.timestamp > {timestamp})
    $timestamp = REQUEST_TIME - variable_get('user_failed_login_user_window', 21600);
    $this->field_alias = $this->query->add_field(NULL, "{$this->table_alias}.identifier AND {$this->table_alias}.timestamp > $timestamp",
      $this->table_alias . '_' . $this->real_field,
      array('function' => 'count')
    );
    $this->query->add_groupby($this->field_alias);

    $operator = '>=';
    if (empty($this->value)) {
      $operator = '<';
    }
    $limit = variable_get('user_failed_login_user_limit', 5);
    $this->query->add_having_expression(NULL, "{$this->field_alias} $operator $limit");
  }
}
heddn’s picture

Status: Active » Needs review
StatusFileSize
new9.73 KB

After #8, I figured out what was needed for the filter. Let's give the full patch a whirl.

heddn’s picture

StatusFileSize
new9.73 KB

Fixed a logic error in the conditional check inside flood_control_operations_unlock_flood()

heddn’s picture

StatusFileSize
new3.48 KB
heddn’s picture

StatusFileSize
new9.81 KB
nwom’s picture

Status: Needs review » Reviewed & tested by the community

#12 applied cleanly to the dev version and worked great! All that is required, is to add the VBO action to the Administration Users view when using Administration Views in combination with VBO as an example.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 12: flood_control-provide_ui_to_remove-1845626-12.patch, failed testing.

The last submitted patch, 12: flood_control-provide_ui_to_remove-1845626-12.patch, failed testing.

The last submitted patch, 12: flood_control-provide_ui_to_remove-1845626-12.patch, failed testing.

The last submitted patch, 12: flood_control-provide_ui_to_remove-1845626-12.patch, failed testing.

batigolix’s picture

Status: Needs work » Closed (won't fix)

I close this because it is a request for the 7.x version.

damienmckenna’s picture

Status: Closed (won't fix) » Reviewed & tested by the community
StatusFileSize
new8.9 KB

The D7 version is still listed as supported, is there a particular reason why you're not willing to commit the patch?

This patch was customized so it can apply to dev versions downloaded from d.o.

parisek made their first commit to this issue’s fork.

parisek’s picture

Opened MR to easily merge this one, seems widely used in production

Thank you

fabianderijk’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, this is merged into the 7 dev version

crystaldawn’s picture

Just in time for the D7 EOL. Impressive. Only took 11yrs to add...... to dev. Trying to figure out of the statement of "Better late than never" actually applies Lol

batigolix’s picture

@crystaldawn : thanks for the feedback.

It may look like a joke that it took such a long time, but there is a reason for this.
For a long time, this module was maintained minimally. We only took over maintenance last year and started adding features and cleaning up the issue queue.

Status: Fixed » Closed (fixed)

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

leducdubleuet’s picture

This simply adds a vbo action which we can add on admin users views. If I am not mistaken, this does not add any UI to see who is locked, we still need the other module "flood_unblock" on Drupal 7 in order to have the UI at "admin/config/system/flood-unblock".

Or am I missing something?