You are here

function referral_get in User Referral 5

Same name and namespace in other branches
  1. 6 referral.module \referral_get()
  2. 7 referral.module \referral_get()
1 string reference to 'referral_get'
referral_menu in ./referral.module

File

./referral.module, line 135

Code

function referral_get() {
  global $user;
  if (!$user->uid) {

    // User has not logged in, or registered yet
    $uid = _referral_ref2uid(arg(1));
    if ($uid && is_numeric($uid)) {

      // A referring User ID is set and it is numeric
      referral_set_cookie($uid);
    }
    drupal_goto('user/register');
  }
  drupal_goto();
}