You are here

function referral_get in User Referral 7

Same name and namespace in other branches
  1. 5 referral.module \referral_get()
  2. 6 referral.module \referral_get()

Page callback for 'referral'

1 string reference to 'referral_get'
referral_menu in ./referral.module
Implements hook_menu().

File

./referral.module, line 189
The referral module.

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)) {

      // Set the referral cookie
      referral_set_cookie($uid);
    }
    drupal_goto(variable_get('referral_goto_path', 'user/register'));
  }
  drupal_goto();
}