Closed (fixed)
Project:
Content Profile
Version:
6.x-1.0-beta3
Component:
Base module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2009 at 09:41 UTC
Updated:
18 Mar 2010 at 07:18 UTC
I am switching over to use content profile from the custom profile. I use computed field to generate some concatenated user info. On a separate node type from the content profile, I want to load the content profile array for a given UID. Then from this array I want to snatch what I want to mash up.
For the custom profile data I use:
user_load(array('uid' => $some_uid))
Is there some equivalent for content profile? It would seem that I'd need to load a node that corresponded to the UID.
Comments
Comment #1
clarkburbidge commentedJust when I get past the point of breaking down and begging, somehow I'm able to figure it out.
In the computed field top code section I use:
content_profile_load('personal', $some_uid)
where 'personal" is my very original machine name for my content profile type. I get the UID from the cck user reference field and then call the array, get out what I want and mash it up.
Once again, great module!
Comment #2
clarkburbidge commentedClosing.
Comment #3
solidarity commentedCould you elaborate--maybe post some of your code? I've been looking for a solution to this for some time. Thanks!
Patrick
Comment #4
clarkburbidge commentedSorry that it took me so long to get back to you. I didn't see your reply until just now.
This computed field is on a "fight" content type. Each fight pairs 2 fighters, user references to two content profiles. In the fight node they are cck fields for the red corner and blue corner. To build the title I pull the uid from the user reference, then load that users "personal" content profile node. From that I grab the names and build the fight title.
Hope that helps you and is not too late!