You are here

function revenue_sharing_basic_get_profile_client_id in Google AdSense integration 5.2

Same name and namespace in other branches
  1. 5.3 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
  2. 6 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
  3. 7 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
3 calls to revenue_sharing_basic_get_profile_client_id()
revenue_sharing_basic_adsense in ./revenue_sharing_basic.module
revenue_sharing_basic_choose_client in ./revenue_sharing_basic.module
revenue_sharing_basic_get_client_id in ./revenue_sharing_basic.module

File

./revenue_sharing_basic.module, line 190

Code

function revenue_sharing_basic_get_profile_client_id($uid = NULL) {
  $client_id = NULL;
  if (!$uid) {
    return $client_id;
  }

  // Get the profile field for a certain user
  $profile_field = variable_get(REVENUE_SHARING_BASIC_CLIENT_ID_PROFILE_FIELD, 0);
  $client_id = db_result(db_query('SELECT value FROM {profile_values} WHERE fid = %d AND uid = %d', $profile_field, $uid));
  return $client_id;
}