You are here

function subuser_menu in Subuser 6

Same name and namespace in other branches
  1. 5 subuser.module \subuser_menu()
  2. 7.2 subuser.module \subuser_menu()

Implementation of hook_menu().

File

./subuser.module, line 20
Allows users of a particular role to create sub user account in another role.

Code

function subuser_menu() {
  $items = array();
  $items['admin/settings/subuser'] = array(
    'title' => 'Subuser',
    'description' => 'Define what, if any, roles are assigned to a new subuser.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'subuser_settings_form',
    ),
    'access arguments' => array(
      'administer subuser settings',
    ),
    'file' => 'subuser.pages.inc',
  );
  $items['user/%user/subuser/create'] = array(
    'title' => variable_get('subuser_create', 'Create subuser'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'subuser_create_form',
      1,
    ),
    'access callback' => 'subuser_user_create_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'subuser.pages.inc',
  );
  $items['subuser/switch/%'] = array(
    'title' => 'Switch subuser',
    'page callback' => 'subuser_switch_user',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'subuser_switch_user_access',
    'access arguments' => array(
      2,
      TRUE,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}