You are here

function referral_admin_flag in User Referral 7

Same name and namespace in other branches
  1. 5 referral.module \referral_admin_flag()
  2. 6 referral.module \referral_admin_flag()
1 string reference to 'referral_admin_flag'
referral_menu in ./referral.module
Implements hook_menu().

File

./referral.module, line 432
The referral module.

Code

function referral_admin_flag() {
  $uid = (int) arg(3);
  $user = user_load($uid);
  db_query('UPDATE {referral}
    SET flag = 1, flag_timestamp = :time
    WHERE uid = :ruid', array(
    'time' => time(),
    'ruid' => $uid,
  ));

  //$num = db_affected_rows();
  drupal_set_message(t('Flagged referral.'));
  drupal_goto('admin/reports/referral/unflagged');
}