You are here

function logintoboggan_menu in LoginToboggan 6

Same name and namespace in other branches
  1. 5 logintoboggan.module \logintoboggan_menu()
  2. 7 logintoboggan.module \logintoboggan_menu()

Implementation of hook_menu()

Related topics

File

./logintoboggan.module, line 509
Logintoboggan Module

Code

function logintoboggan_menu() {
  $items = array();

  // Settings page.
  $items['admin/user/logintoboggan'] = array(
    'title' => 'LoginToboggan',
    'description' => 'Set up custom login options like instant login, login redirects, pre-authorized validation roles, etc.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'logintoboggan_main_settings',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer site configuration',
    ),
  );

  // Callback for user validate routine.
  $items['user/validate/%user/%/%'] = array(
    'title' => 'Validate e-mail address',
    'page callback' => 'logintoboggan_validate_email',
    'page arguments' => array(
      2,
      3,
      4,
    ),
    'access callback' => 'logintoboggan_validate_email_access',
    'access arguments' => array(
      2,
      3,
    ),
    'type' => MENU_CALLBACK,
  );

  // Callback for handling access denied redirection.
  $items['toboggan/denied'] = array(
    'access callback' => TRUE,
    'page callback' => 'logintoboggan_denied',
    'title' => 'Access denied',
    'type' => MENU_CALLBACK,
  );

  //callback for re-sending validation e-mail
  $items['toboggan/revalidate/%user'] = array(
    'title' => 'Re-send validation e-mail',
    'page callback' => 'logintoboggan_resend_validation',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'logintoboggan_revalidate_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}