session_limit.rules.inc 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @file
  4. * Rules integration with session_limit.
  5. */
  6. /**
  7. * Implements hook_rules_event_info().
  8. */
  9. function session_limit_rules_event_info() {
  10. $items = array();
  11. $items['session_limit_collision'] = array(
  12. 'label' => t('User logs in and has too many active sessions'),
  13. 'variables' => array(
  14. 'account' => array(
  15. 'type' => 'user',
  16. 'label' => t('The user who logged in.'),
  17. ),
  18. 'session_id' => array(
  19. 'type' => 'text',
  20. 'label' => t('The session id.'),
  21. ),
  22. ),
  23. 'group' => t('Session Limit'),
  24. );
  25. $items['session_limit_disconnect'] = array(
  26. 'label' => t('User is logged out by a newer session'),
  27. 'variables' => array(
  28. 'account' => array(
  29. 'type' => 'user',
  30. 'label' => t('The user who was logged out.'),
  31. ),
  32. 'session_id' => array(
  33. 'type' => 'text',
  34. 'label' => t('The session id.'),
  35. ),
  36. ),
  37. 'group' => t('Session Limit'),
  38. );
  39. return $items;
  40. }