function account_sync_receiver_settings in Account Sync 7.2
Same name and namespace in other branches
- 6 account_sync.admin.inc \account_sync_receiver_settings()
Settings form for the receiver.
1 string reference to 'account_sync_receiver_settings'
- account_sync_menu in ./
account_sync.module - Implements hook_menu().
File
- ./
account_sync.admin.inc, line 102 - Admin settings for account_sync.
Code
function account_sync_receiver_settings() {
$form['account_sync_in_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Allow other sites to sync into this site'),
'#description' => t('Enabling this will allow 3rd party drupal sites with the server key to update user accounts on /this/ site when changes happen on their site'),
'#default_value' => variable_get('account_sync_in_enabled', FALSE),
);
$form['account_sync_create_users'] = array(
'#type' => 'checkbox',
'#title' => t("Create users that aren't found when syncing to this site."),
'#description' => t("If enabled, users synced from another server to this server that don't currently exist on this server will be created. This setting has no effect on remote servers."),
'#default_value' => variable_get('account_sync_create_users', FALSE),
);
$form['account_sync_match_roles'] = array(
'#type' => 'checkbox',
'#title' => t('Attempt to match roles'),
'#description' => t('Role ids may not be in sync from site to site. Using this will attempt to match a users roles by matching against role names instead of role IDs.') . ' (<strong>' . t('Recommended') . '</strong>)',
'#default_value' => variable_get('account_sync_match_roles', TRUE),
);
$form['restrictions'] = array(
'#type' => 'fieldset',
'#title' => t('IP restrictions'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['restrictions']['account_sync_ip_restriction'] = array(
'#type' => 'radios',
'#title' => t('Restrict account sync update access to specific IP addresses'),
'#options' => array(
t('Allow access from all IPs except the listed ones.'),
t('Allow access from only the listed IPs.'),
),
'#default_value' => variable_get('account_sync_ip_restriction', 0),
);
$form['restrictions']['account_sync_ips'] = array(
'#type' => 'textarea',
'#title' => t('IPs'),
'#description' => t('Enter one IP address per line.'),
'#default_value' => variable_get('account_sync_ips', ''),
);
return system_settings_form($form);
}