Hello,

I have been using Drupal for three weeks and it's great. I am having a really big problem right now however and I have searched for 6 hours without finding a solution. For someone with experience this should take less than a minute to figure out!

I need to figure out the PHP code that returns the NID of the current user's content profile.

This will then be used by Rules to make a connection between the current node and the user profile. I tried using flags but flags will not work for my situation. I really need help right now just figuring out the NID of the profile then everything else will work.

FYI this is what I mean by content profile: http://drupal.org/project/content_profile

Comments

dnewkerk’s picture

Looking inside the module, I see this function which might be related to what you want:
content_profile_load($type, $account->uid);

Search inside content_profile.module for the full code.

davidzo’s picture

Thank you for the quick response but I don't know how to get the node id from this. Do you know how to do that?

davidzo’s picture

And still I can't find a solution. I want to use Rules and flags to create node links. How can I do this??

intrafusion’s picture

The Node table contains a field called uid which is the link to the users table