You are here

function trigger_session_limit in Session Limit 7.2

Same name and namespace in other branches
  1. 6.2 session_limit.module \trigger_session_limit()

Implements hook_session_limit().

This implements the hook on behalf of the trigger module.

File

./session_limit.module, line 693
Limits multiple sessions per user.

Code

function trigger_session_limit($sid, $op) {

  // Find all the actions against this $op.
  // Note: this notation requires the $op to match the bit in the trigger info keys after session_limit!
  $aids = trigger_get_assigned_actions('session_limit_' . $op);
  $context = array(
    'hook' => 'session_limit',
    'op' => $op,
    'sid' => $sid,
  );
  actions_do(array_keys($aids), $GLOBALS['user'], $context);
}