You are here

function fb_user_admin_settings in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 6.3 fb_user.admin.inc \fb_user_admin_settings()
  2. 7.4 fb_user.admin.inc \fb_user_admin_settings()
  3. 7.3 fb_user.admin.inc \fb_user_admin_settings()

Form builder; Configure settings for this site.

See also

system_settings_form()

1 string reference to 'fb_user_admin_settings'
fb_user_menu in ./fb_user.module
Implementation of hook_menu().

File

./fb_user.admin.inc, line 16
Admin pages and forms for user settings.

Code

function fb_user_admin_settings() {
  $options = array(
    0 => t('<none>'),
  ) + fb_admin_get_app_options(FALSE);
  if (count($options) == 1) {
    $message = t('You must create an app first!');
    drupal_set_message($message, 'error');
    return array(
      'help' => array(
        '#value' => $message,
      ),
    );
  }
  $form[FB_USER_VAR_STATS] = array(
    '#type' => 'checkbox',
    '#title' => t('Record Statistics'),
    '#description' => t('If checked, maintain data about the most recent visit of each user who has authorized an app.  Enable if you want this sort of record kept.  Enable also if you want to run cron actions for each user of an app.  Disable for better performance.'),
    '#default_value' => variable_get(FB_USER_VAR_STATS, TRUE),
  );
  return system_settings_form($form);
}