You are here

function tokenauth_admin_settings in Token authentication 5

Same name and namespace in other branches
  1. 6.2 tokenauth.pages.inc \tokenauth_admin_settings()
  2. 6 tokenauth.pages.inc \tokenauth_admin_settings()
  3. 7 tokenauth.pages.inc \tokenauth_admin_settings()

Implementation of hook_settings().

1 string reference to 'tokenauth_admin_settings'
tokenauth_menu in ./tokenauth.module
Implementation of hook_menu().

File

./tokenauth.module, line 13

Code

function tokenauth_admin_settings() {
  $form['tokenauth_general'] = array(
    '#type' => 'fieldset',
    '#title' => t('Token settings'),
  );
  $form['tokenauth_general']['tokenauth_length'] = array(
    '#type' => 'textfield',
    '#title' => t('Token length'),
    '#size' => 4,
    '#maxlength' => 4,
    '#required' => TRUE,
    '#default_value' => variable_get('tokenauth_length', 10),
    '#description' => t('Does not affect existing tokens.'),
  );
  $form['tokenauth_general']['tokenauth_pages'] = array(
    '#type' => 'textarea',
    '#title' => t('Activate Tokens on specific pages'),
    '#default_value' => variable_get('tokenauth_pages', "rss.xml\n*/feed\n*/opml"),
    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
      '%blog' => 'blog',
      '%blog-wildcard' => 'blog/*',
      '%front' => '<front>',
    )),
  );
  $form['tokenauth_advanced'] = array(
    '#type' => 'fieldset',
    '#title' => t('Token actions'),
    '#description' => t('Reset the tokens for all users. If you have changed token length, be sure to save that change before resetting all tokens.'),
  );
  $form['tokenauth_advanced']['tokenauth_reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset tokens'),
  );
  return system_settings_form($form);
}