You are here

function nodejs_actions_user_action in Node.js integration 7

User object action callback.

Parameters

object $user:

array $context:

File

nodejs_actions/nodejs_actions.module, line 91

Code

function nodejs_actions_user_action($user, $context = array()) {
  if ($action = nodejs_actions_get_action($context)) {
    $subject = t('A user %action.', array(
      '%action' => $action,
    ));
    $link = l($user->name, 'user/' . $user->uid);
    $body = t('The user !link %action.', array(
      '!link' => $link,
      '%action' => $action,
    ));
    nodejs_actions_enqueue_message($subject, $body);
  }
}