I’ve tried this so far in a Drupal 7 installation:
<?php print $user_picture; ?>
<?php print $user->picture ?>
<?php print $node->picture ?>
None of these snippets will get me the picture printed on the page.
I’m using Devel’s module, so I tried to get it to give me some hints. This is all I get:
picture (String, 1 characters ) 0
$...->picture
I’ve read that to print a variable you just print or echo it (echo $var1
for example). So why won’t this work? I’m adding this snippet inside my node.tpl.php
template.
Any thoughts on this? Thank you for your insight!!
Update: This is the result of var_dump($user_picture)
:
string(0) ""