You are here

function require_login_admin_settings in Require Login 7

Require login configuration form callback.

1 string reference to 'require_login_admin_settings'
require_login_menu in ./require_login.module
Implements hook_menu().

File

./require_login.admin.inc, line 11
require_login.admin.inc

Code

function require_login_admin_settings() {
  $form['require_login_deny_message'] = array(
    '#type' => 'textarea',
    '#title' => t('Access Denied Message'),
    '#description' => t('Shown to anonymous users prior to user authentication (login).'),
    '#default_value' => variable_get('require_login_deny_message', REQUIRE_LOGIN_DEFAULT_MESSAGE),
  );
  $items = array(
    t('Use <front> to exclude the front page.'),
    t('Use relative path to exclude content and other internal Drupal pages. <em>Example: /about/contact</em>'),
    t('Use absolute path to exclude Drupal bootstrap enabled PHP scripts. <em>Example: /path/to/drupal/script/filename.php</em>'),
  );
  $items = theme('item_list', array(
    'items' => $items,
  ));
  $form['require_login_excluded_paths'] = array(
    '#type' => 'textarea',
    '#title' => t('Exclude Paths'),
    '#description' => t('Disable user authentication (login) requirement on specific paths. Enter one exclusion per line using the following formats:') . $items,
    '#default_value' => variable_get('require_login_excluded_paths', ''),
  );
  $form['require_login_auth_path'] = array(
    '#type' => 'textfield',
    '#title' => t('User Authentication (Login) Path'),
    '#description' => t('Override the user authentication (login) path. May include URL queries and fragments.'),
    '#default_value' => variable_get('require_login_auth_path', 'user/login'),
  );
  return system_settings_form($form);
}