You are here

function watchdog_triggers_watchdog_triggers in Logging and alerts 7.2

Same name and namespace in other branches
  1. 6.2 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()
  2. 6 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()
  3. 7 watchdog_triggers/watchdog_triggers.module \watchdog_triggers_watchdog_triggers()

Implements hook_watchdog_triggers().

File

watchdog_triggers/watchdog_triggers.module, line 26
Provides a Trigger and Action integration for watchdog events.

Code

function watchdog_triggers_watchdog_triggers($op, $user) {
  if (!in_array($op, array(
    'watchdog_logged',
  ))) {
    return;
  }
  $aids = trigger_get_assigned_actions('watchdog_logged', $op);
  $context = array(
    'hook' => 'watchdog_logged',
    'op' => $op,
    'user' => $user,
  );
  actions_do(array_keys($aids), $user, $context);
}