function system_block_ip_action
system_block_ip_action()
Blocks the current user's IP address.
Related topics
File
- modules/system/system.module, line 3355
- Configuration system that lets administrators modify the workings of the site.
Code
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)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_block_ip_action/7.x