I have a Content Profile Content Type with a field that is a User Reference (call it default user rel).
When creating a new content type (not a content profile), that also has a User Reference field, I would like the default user to be populated from the Content Profile's User Reference field (default user rel).
For the content type, i have a User Reference Field, and for the default I have:
$id2 = arg(3);
$profileuser2 = user_load($id2);
$useraffiliate2 = content_profile_load('content_profile_aff_relationship', $profileuser2->uid);
$useraffiliatename = $useraffiliate2->field_content_profile_affiliate1;
$useraffiliatenamel = user_load($useraffiliatename);
return array(0 => array ('uid' => $useraffiliatename->uid));
I also tried:
$id2 = arg(3);
$profileuser2 = user_load($id2);
$useraffiliate2 = content_profile_load('content_profile_aff_relationship', $profileuser2->uid);
$useraffiliatename = $useraffiliate2->field_content_profile_affiliate1[0]['value'];
$useraffiliatenamel = user_load($useraffiliatename);
return array(0 => array ('uid' => $useraffiliatename->uid));
Thank you for any help. Greatly appreciated.
Comments
Comment #1
dharani87 commentedAny Update on this ?