function account_sync_settings in Account Sync 7.2
Same name and namespace in other branches
- 6 account_sync.admin.inc \account_sync_settings()
FAPI callback for the admin settings form.
1 string reference to 'account_sync_settings'
- account_sync_menu in ./
account_sync.module - Implements hook_menu().
File
- ./
account_sync.admin.inc, line 11 - Admin settings for account_sync.
Code
function account_sync_settings() {
$form = array();
if (!account_sync_allowed_roles()) {
drupal_set_message(t('No roles have been configured with the <em>sync account</em> permission. Account syncing will not work until you set up your <a href="!url">permissions</a> appropriately.', array(
'!url' => url('admin/user/permissions'),
)), 'warning');
}
$form['account_sync_server_key'] = array(
'#type' => 'textfield',
'#title' => t('Server key'),
'#description' => t('Any sites you wish to sync with must have the same key'),
'#default_value' => variable_get('account_sync_server_key', ''),
);
$form['account_sync_uid1'] = array(
'#type' => 'checkbox',
'#title' => t('Allow UID 1 to be synced.'),
'#description' => t("It's recommended that this is left disabled."),
'#default_value' => variable_get('account_sync_uid1', FALSE),
);
$form['sync_all'] = array(
'#type' => 'fieldset',
'#title' => 'Sync accounts',
'#collapsible' => FALSE,
);
$form['sync_all']['info'] = array(
'#markup' => t('This button will send all data from accounts on this site to all other configured sites.'),
'#prefix' => '<p>',
'#suffix' => '</p>',
);
$form['sync_all']['account_sync_sync_all'] = array(
'#type' => 'submit',
'#value' => t('Sync all accounts now'),
'#submit' => array(
'account_sync_sync_all',
),
);
return system_settings_form($form);
}