function revenue_sharing_basic_get_profile_client_id in Google AdSense integration 5.3
Same name and namespace in other branches
- 5.2 revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
- 6 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
- 7 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_get_profile_client_id()
Provide the Publisher ID of the the specified user
Parameters
$uid: User ID
Return value
Publisher ID of the specified user in case it applies, otherwise NULL
2 calls to revenue_sharing_basic_get_profile_client_id()
- revenue_sharing_basic_choose_client in old/
revenue_sharing_basic/ revenue_sharing_basic.module - Provide the applicable Publisher ID, based on the configured probabilities
- revenue_sharing_basic_get_referral_client_id in old/
revenue_sharing_basic/ revenue_sharing_basic.module - Provide the Publisher ID of the user of referred the specified user
File
- old/
revenue_sharing_basic/ revenue_sharing_basic.module, line 180 - Main file of the revenue_sharing_basic module
Code
function revenue_sharing_basic_get_profile_client_id($uid) {
$client_id = NULL;
if ($uid) {
// Get the profile field for a certain user
$profile_field = variable_get('revenue_sharing_basic_client_id_profile_field', REVENUE_SHARING_BASIC_CLIENT_ID_PROFILE_FIELD_DEFAULT);
$client_id = db_result(db_query('SELECT value FROM {profile_values} WHERE fid = %d AND uid = %d', $profile_field, $uid));
}
return $client_id;
}