Displaying the username of the user who created the node in the node template file I created file node--my_content_type.tpl.php, where I'd like to print the username as string. I tried the following code, but unfortunately it doesn't work. How can I do it?

&lt;?php 
  print $name;
?&gt;
$node-&gt;name will get you the name of the author who submitted the node. It will return it as string, not as link to the user account.