function user_user_flood_control

Implements hook_user_flood_control().

File

modules/user/user.module, line 2269

Code

function user_user_flood_control($ip, $username = FALSE) {
  if (variable_get('log_user_flood_control', TRUE)) {
    if (!empty($username)) {
      watchdog('user', 'Flood control blocked login attempt for %user from %ip.', array(
        '%user' => $username,
        '%ip' => $ip,
      ));
    }
    else {
      watchdog('user', 'Flood control blocked login attempt from %ip.', array(
        '%ip' => $ip,
      ));
    }
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.