function fb_register_form_alter in Drupal for Facebook 6.2
Implementation of hook_form_alter().
Add our settings to each Facebook Application form.
File
- contrib/
fb_register.module, line 245 - This code aims to prevent duplicate accounts.
Code
function fb_register_form_alter(&$form, &$form_state, $form_id) {
// Add our settings to the fb_app edit form.
if (isset($form['fb_app_data'])) {
$fb_app = $form['#fb_app'];
$fb_app_data = fb_get_app_data($fb_app);
$fb_register_data = isset($fb_app_data['fb_register']) ? $fb_app_data['fb_register'] : array(
'register_users' => FALSE,
);
$form['fb_app_data']['fb_register'] = array(
'#type' => 'fieldset',
'#title' => t('Register Users'),
'#tree' => TRUE,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['fb_app_data']['fb_register']['register_users'] = array(
'#type' => 'checkbox',
'#title' => t('Register Local Users on Facebook'),
'#description' => t('Use <a target=_blank href=http://wiki.developers.facebook.com/index.php/Connect.registerUsers>Connect.registerUsers</a> to help map local accounts to Facebook accounts. This will share information about your users with Facebook.'),
'#default_value' => $fb_register_data['register_users'],
);
}
}