Retrieving the Node Id of the profile of the current user
I am working with Rules and I can't figure out what code I need to enter into the PHP code box so that it will return the NID of the profile node for the currently logged in user.
I think this is just a matter of knowing which variable hold the value but I can't find it anywhere.
Groups:
Login to post comments
You can figure out the UID
You can figure out the UID using
return array(0=> array('uid' => $user->uid));
But how do you get the profile's NID using the user's UID?
Depends
What method are you using to provide the user with a profile? Content_profile module, or something else? What version of Drupal?
Web Development in Nottingham, UK by Kineta Systems / Follow me on Twitter! @NikLP
me too
Hi,
I got the same issue. I want to create an own template with user-profile.tpl.php and I need to access the corresponding node (nid) from the uid.
using drupal 6 and the content node module. (no additional plugins used for the user profiling)
cheers,
ulf
Hi. You can use the
Hi. You can use the method:
content_profile_load('perfil', $uid, $lang = '')
Where 'perfil' is the content_type of the profile content, $uid is the user id fetched previously and $lang = '' is a parameter that you can keep equal.
I hope this can Help!
Regards,
Gabriel