Anyone know how to pull the avatar of a user as you are looking at their profile, but in a block? I'm not a PHP wiz at all, and I've only figured out a way to print the logged in users picture. Here's the code I have at the moment. Please disregard the sloppiness; the first part is the unfunctional part. Would a db_query be what I need?
<?php global $user; ?> <?php if (arg(0) == 'user' && $user->uid != arg(1)) : ?> <div class="userpic2"><?php print theme('user_picture', $user->uid); ?></div> <?php elseif ($user->uid) : ?> <div class="userpic"><?php print theme('user_picture', $user); ?></div> <?php else : ?> <div class="userpic2"><img src="http://tenning.com/themes/box_grey/noaccount.png" /></div> <?php endif; ?>
Thanks in advance!