You are here

function _referral_uid2ref in User Referral 7

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

Convert a UID to a referral reference code

Parameters

$uid The numeric user id:

6 calls to _referral_uid2ref()
referral_forward_node_view_alter in referral_forward/referral_forward.module
Implements hook_node_view_alter().
referral_tokens in ./referral.module
Implements hook_tokens().
referral_user_load in ./referral.module
Implements hook_user_load().
referral_user_view in ./referral.module
Implements hook_user_view().
referral_view in ./referral.module

... See full list

File

./referral.module, line 775
The referral module.

Code

function _referral_uid2ref($uid) {
  if ($uid) {
    if (is_numeric($uid)) {
      $ref = dechex(_referral_hex_seed() + $uid);
      return $ref;
    }
  }
  return FALSE;
}