How to show avatar of current logged in user in a widget

This should work great… in this example i am using wordpress codex so you can comapre:

From WordPress Codex

<?php echo get_avatar( $id_or_email, $size, $default, $alt ); ?> 

so… Based on that…

This is the code you should embed in the desired location in your theme:

<?php
    wp_get_current_user();
    $size = array(60,60); // this is the size of the avatar
    echo get_avatar( $current_user->user_email, $size, $default, $current_user->display_name );
?>

.
Hope this helps 🙂