Reputation: 7247
I'd like to know how to display a user avatar in Drupal 7. I want to display the avatar in full size and as the thumbnail.
Upvotes: 3
Views: 13823
Reputation: 11
When I use the user picture is linked to the user profile. I have set my user images to be displayed as thumbnails. I'd like to link the user picture to the full sized picture and display them using lightboxII. It seems to be a very easy task but I couldn't figure out yet how to do it.
Upvotes: 1
Reputation: 20631
You can use something like:
$user_item = user_load_by_name($username); // or user_load( $user->uid )
print theme('user_picture', array('account' =>$user_item));
Upvotes: 9
Reputation: 8540
Make sure you enable User profiles in the account settings (admin/config/people/accounts) and then you can display them in templates using $user_profile:-
http://api.drupal.org/api/drupal/modules--node--node.tpl.php/7
The user-picture.tpl.php template will let you override how it is output.
Upvotes: 0