You are here

function referral_trigger_referral in User Referral 6

File

referral_trigger/referral_trigger.module, line 21

Code

function referral_trigger_referral($new_uid, $referrer_uid) {
  $aids = _trigger_get_hook_aids('referral', 'new');
  $context = array(
    'hook' => 'referral',
    'op' => '',
    'new_uid' => $new_uid,
    'referrer_uid' => $referrer_uid,
  );

  // act on referrer user object.
  $object = user_load($referrer_uid);
  actions_do(array_keys($aids), $object, $context);
}