You are here

function session_limit_token_info in Session Limit 7.2

Implements hook_token_info().

Create tokens for the current user.

File

./session_limit.tokens.inc, line 13
Provide tokens for session limit.

Code

function session_limit_token_info() {
  $type = array(
    'name' => t('Session limit'),
    'description' => t('Tokens related to session limit module.'),
    'needs-data' => 'user',
  );
  $session_limit['default'] = array(
    'name' => t('Default sessions'),
    'description' => t('Maximum number of active sessions configured specific to the user.'),
  );
  $session_limit['max'] = array(
    'name' => t('Maximum sessions'),
    'description' => t('Maximum number of active sessions allowed, accounting for all configuration possibilities.'),
  );
  $session_limit['role'] = array(
    'name' => t('Maximum sessions by role'),
    'description' => t('Maximum number of active sessions allowed by role.'),
  );
  $session_limit['user'] = array(
    'name' => t('Maximum sessions for user'),
    'description' => t('Maximum number of active sessions configured specific to the user.'),
  );
  return array(
    'types' => array(
      'session_limit' => $type,
    ),
    'tokens' => array(
      'session_limit' => $session_limit,
    ),
  );
}