0

I have a content of type summary only visible by the author and administrators. I need to print in my node--summary.tpl.php the author's email address that was set at the account creation.

Any idea how this can be achieved?

1

Use

<?php
  print $user->mail;
?>

If $user is not available use

<?php
  $user = user_load($node->uid);
  print $user->mail;
?>
  • Such a simple answer. Thank you GiorgosK it works as expected. – Florin Simion Mar 13 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.