You are here

function user_load_activity_context in Activity 6.2

Load up the context array to pass to activity_record.

Parameters

string $hook: The hook that is being fired.

string $op: The op for that hook.

string $id: The id for the action.

Return value

array The context array for activity_record.

See also

trigger_user

1 string reference to 'user_load_activity_context'
user_activity_info in ./activity.module

File

modules/user.activity.inc, line 96
Activity definition file for user.module

Code

function user_load_activity_context($hook, $op, $id) {
  $account = user_load($id);
  $context = array();
  if (!empty($account)) {
    $context = array(
      'hook' => $hook,
      'op' => $op,
      'form_values' => array(),
      'account' => $account,
    );
  }
  return $context;
}