function ip_login_admin_settings in IP Login 5
Same name and namespace in other branches
- 6.2 ip_login.admin.inc \ip_login_admin_settings()
- 6 ip_login.module \ip_login_admin_settings()
- 7.3 ip_login.admin.inc \ip_login_admin_settings()
- 7.2 ip_login.admin.inc \ip_login_admin_settings()
1 string reference to 'ip_login_admin_settings'
- ip_login_menu in ./
ip_login.module - Implementation of hook_menu
File
- ./
ip_login.module, line 33
Code
function ip_login_admin_settings() {
$result = db_query("SELECT DISTINCT name FROM {profile_fields}");
if (db_num_rows($result)) {
while ($field = db_fetch_object($result)) {
$fields[$field->name] = $field->name;
}
}
$form['info'] = array(
'#type' => 'markup',
'#value' => 'This module allows users to login automatically by IP address. The IP address value stored in a user\'s profile, using the \'profile\' module, is used to authenticate and login that user when visiting from that address. Addresses like 203.123.456.789 and also ranges like 203.123.456.* are supported.',
);
$form['ip_login_profile_ip_field'] = array(
'#type' => 'select',
'#title' => t('Profile module IP address field'),
'#description' => t('Select the profile field containing the user IP address.'),
'#options' => $fields,
'#default_value' => variable_get('ip_login_profile_ip_field', 'profile_ip'),
);
return system_settings_form($form);
}