Skip to:
Content

BuddyPress.org

Ticket #2288: avatar_fix.diff

File avatar_fix.diff, 613 bytes (added by rvenable, 14 years ago)
  • bp-core/bp-core-avatars.php

     
    344344// Override internal "get_avatar()" function to use our own where possible
    345345function bp_core_fetch_avatar_filter( $avatar, $user, $size, $default, $alt ) {
    346346        global $authordata;
    347 
     347       
    348348        if ( is_object( $user ) )
    349349                $id = $user->user_id;
    350350        else if ( is_numeric( $user ) )
    351351                $id = $user;
     352        else if ( $_user = get_user_by_email( $user ) )
     353                $id = $_user->ID;
    352354        else
    353355                $id = $authordata->ID;
    354356