You are here

function restrict_by_ip_general_settings in Restrict Login or Role Access by IP Address 7.3

Same name and namespace in other branches
  1. 6.3 restrict_by_ip.module \restrict_by_ip_general_settings()

Menu callback for general module settings

1 string reference to 'restrict_by_ip_general_settings'
restrict_by_ip_menu in ./restrict_by_ip.module
Implementation of hook_menu().

File

./restrict_by_ip.module, line 188
Allows the admin to select which ip addresses role or a user can login from for this site Some of the code below is taken from the cck_ipaddress_module

Code

function restrict_by_ip_general_settings() {
  drupal_set_title(t('Restrict by IP'));
  $form = array();
  $form['restrict_by_ip_header'] = array(
    '#type' => 'textfield',
    '#title' => t('Header to check'),
    '#description' => t("This is the HTTP request header that contains the client IP Address.  It is sometimes re-written by reverse proxies and Content Distribution Networks.  If it is left blank it will be default to REMOTE_ADDR.  In most cases you can leave this blank."),
    '#default_value' => variable_get('restrict_by_ip_header', 'REMOTE_ADDR'),
  );
  return system_settings_form($form);
}