function ip_ranges_whitelist_own_address in IP Ranges 7.2
Same name and namespace in other branches
- 7 ip_ranges.module \ip_ranges_whitelist_own_address()
Whitelists users own IP-address.
1 string reference to 'ip_ranges_whitelist_own_address'
- ip_ranges_menu in ./
ip_ranges.module - Implements hook_menu().
File
- ./
ip_ranges.module, line 167
Code
function ip_ranges_whitelist_own_address() {
// Description text.
$own_ip_text = t('Own IP-address');
// Write record and log.
ip_ranges_write_record(ip_address(), 'whitelist', NULL, $own_ip_text);
drupal_set_message(t('Your own IP-address (@ip) has been whitelisted.', array(
'@ip' => ip_address(),
)));
drupal_goto('admin/config/people/ip-ranges');
}