function user_block_ip_action
6.x user.module | user_block_ip_action() |
Implementation of a Drupal action. Adds an access rule that blocks the user's IP address.
1 string reference to 'user_block_ip_action'
- user_action_info in drupal-6.x/
modules/ user/ user.module - Implementation of hook_action_info().
File
- drupal-6.x/
modules/ user/ user.module, line 2340 - Enables the user registration and login system.
Code
function user_block_ip_action() {
$ip = ip_address();
db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', '%s', %d)", $ip, 'host', 0);
watchdog('action', 'Banned IP address %ip', array('%ip' => $ip));
}