You are here

function rules_action_change_referral in User Referral 7

Rules action callback

1 string reference to 'rules_action_change_referral'
referral_rules_action_info in ./referral.rules.inc
Implements hook_rules_action_info().

File

./referral.rules.inc, line 210
Rules integration

Code

function rules_action_change_referral($target_user, $ref_user) {
  db_update('referral')
    ->fields(array(
    'referral_uid' => $ref_user->uid,
    'created' => time(),
  ))
    ->condition('uid', $target_user->uid)
    ->execute();
}