I am showing userpicture on node with this code here:
<?php $user_load = user_load($node->uid); $imgtag = theme('imagecache', 'avatar_node', $user_load->picture, $user_load->name, $user_load->name); $attributes = array('attributes' => array('title' => t('View user profile.')), 'html' => TRUE); print l($imgtag, 'u/'.$user_load->name, $attributes); ?>
This works great if the user has no image, in which case it looks weird.
How to load a default image if the user does not have an image. I do not believe that I have access to $ picture in this block.
Thanks in advance.
source share