Posted by baltusf on June 13, 2010 at 10:40am
Hi,
I hav made a node-profile.tpl.php for showing information about a specific uers. In the node-profile i added some cck-fields witha additional information.
What i want now is to display the e-mail address of the person from which i show his profile. How can i get that. I know that with
global $user; print $user-->email;
I got the e-mail address from the user who is logged on... But how to get the users e-mail address from the profile?
Thnx,
Fred
Comments
Try loading the user object
Try loading the user object for the author of the node like this:
<?php$author = user_load($uid);
?>
and then you can print the email like this:
<?phpprint render($author->mail);
?>
This is for Drupal 7.x. Hope it helps...