You are here

function flood_unblock_settings_submit in Flood Unblock 7

The submit function.

File

./flood_unblock.admin.inc, line 114
Admin page callbacks for the flood_unblock module.

Code

function flood_unblock_settings_submit($form, &$form_state) {
  foreach ($form_state['values']['table'] as $value) {
    if ($value != "0") {
      $type = $form['table']['#options'][$value]['type'];
      switch ($type) {
        case 'ip':
          $type = 'failed_login_attempt_ip';
          break;
        case 'user':
          $type = 'failed_login_attempt_user';
          break;
      }
      $identifier = $value;
      flood_unblock_clear_event($type, $identifier);
    }
  }
}