It seems that when a Content Profile node is created for a user, its uid field will always reference that user, even if another user actually created the profile node.
So to load up a user object from a Content Profile node you could do something like this:
$user = user_load($profile_node->uid);
If you're wondering how to do the opposite, that is load a content profile node for a given user/uid then have a look at this earlier post:
Did you find this post helpful? If so, we'd love to hear from you in our comments! If you found it really useful we'd love a link from your Blog-Web Site, to us!
Post new comment