How do I get nodeprofile fields when I have UID?

JustJamesAus - September 29, 2008 - 12:07
Project:Node Profile
Version:5.x-1.4
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, I'm writing a module that needs to search and display some of the nodeprofile fields, but they don't seem to be included in the $user object when I do a user_load. And I can't see how the node profile is linked to the user - there's no uid that I can use to match and find the right data in the CCK content_type_profile that I created.

How are they linked and I how can I use a $user->uid to get the data from the extra fields?

Thanks

#1

JustJamesAus - October 6, 2008 - 23:32

I've discovered that nodeprofile_load('content_type', $user->uid) works sometimes

Eg, $profilenode = nodeprofile_load('operator_profile', $vars['uid']); works in hook_form but the exact same code does not work in hook_update. The uid is the same in both cases, I checked.

Am I missing something?

 
 

Drupal is a registered trademark of Dries Buytaert.