function system_ip_blocking_form_submit in Drupal 7
1 string reference to 'system_ip_blocking_form_submit'
- system_ip_blocking_form in modules/
system/ system.admin.inc - Define the form for blocking IP addresses.
File
- modules/
system/ system.admin.inc, line 1457 - Admin page callbacks for the system module.
Code
function system_ip_blocking_form_submit($form, &$form_state) {
$ip = trim($form_state['values']['ip']);
db_insert('blocked_ips')
->fields(array(
'ip' => $ip,
))
->execute();
drupal_set_message(t('The IP address %ip has been blocked.', array(
'%ip' => $ip,
)));
$form_state['redirect'] = 'admin/config/people/ip-blocking';
return;
}