You are here

function _adsense_get_profile_client_id in Google AdSense integration 5

2 calls to _adsense_get_profile_client_id()
_adsense_choose_client in ./adsense.module
_adsense_get_site_owner_client_id in ./adsense.module

File

./adsense.module, line 1611

Code

function _adsense_get_profile_client_id($uid = 0) {
  $client_id = '';
  if (module_exists('profile')) {

    // Get the profile field for a certain user
    $profile_field = variable_get(ADSENSE_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;
}