function system_block_ip_action

Blocks the current user's IP address.

Related topics

1 string reference to 'system_block_ip_action'
system_action_info in drupal-7.x/modules/system/system.module
Implements hook_action_info().

Archivo

drupal-7.x/modules/system/system.module, line 3321
Configuration system that lets administrators modify the workings of the site.

Código

function system_block_ip_action() {
  $ip = ip_address();
  db_insert('blocked_ips')->fields(array('ip' => $ip))->execute();
  watchdog('action', 'Banned IP address %ip', array('%ip' => $ip));
}