Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comments
Comment #1
JmsCrk CreditAttribution: JmsCrk commentedI'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?