function revenue_sharing_by_role_get_profile_client_id in Google AdSense integration 5.2
3 calls to revenue_sharing_by_role_get_profile_client_id()
- revenue_sharing_by_role_adsense in contrib/
revenue_sharing_by_role/ revenue_sharing_by_role.module - revenue_sharing_by_role_choose_client in contrib/
revenue_sharing_by_role/ revenue_sharing_by_role.module - revenue_sharing_by_role_get_client_id in contrib/
revenue_sharing_by_role/ revenue_sharing_by_role.module
File
- contrib/
revenue_sharing_by_role/ revenue_sharing_by_role.module, line 180
Code
function revenue_sharing_by_role_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_BY_ROLE_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;
}