function session_limit_menu in Session Limit 7.2
Same name and namespace in other branches
- 5 session_limit.module \session_limit_menu()
- 6.2 session_limit.module \session_limit_menu()
- 6 session_limit.module \session_limit_menu()
Implements hook_menu().
File
- ./
session_limit.module, line 76 - Limits multiple sessions per user.
Code
function session_limit_menu() {
$items['session/limit'] = array(
'title' => 'Session limit exceeded',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_page',
),
'access callback' => 'user_is_logged_in',
'type' => MENU_CALLBACK,
);
$items['mysessions'] = array(
'title' => 'My sessions',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_page',
),
'access callback' => 'user_is_logged_in',
'type' => MENU_SUGGESTED_ITEM,
);
$items['admin/config/people/session-limit'] = array(
'title' => 'Session limit',
'description' => 'Configure session limits.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_settings',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
);
$items['admin/config/people/session-limit/defaults'] = array(
'title' => 'Defaults',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_settings',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/config/people/session-limit/roles'] = array(
'title' => 'Role limits',
'description' => 'Configure session limits by role.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_settings_byrole',
),
'access arguments' => array(
'administer session limits by role',
),
'type' => MENU_LOCAL_TASK,
);
$items['user/%user/session-limit'] = array(
'title' => 'Session limit',
'description' => 'Configure session limit for one user.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'session_limit_user_settings',
1,
),
'access arguments' => array(
'administer session limits per user',
),
'type' => MENU_LOCAL_TASK,
);
return $items;
}