Skip to:
Content

BuddyPress.org

Ticket #2288: user_by_email.patch

File user_by_email.patch, 422 bytes (added by johnjamesjacoby, 14 years ago)

The only reason not to do this, is for the potential DB hits in the event the user_id isn't cached. I imagine that's why this was left out. Assigned to Andy for review.

  • bp-core-avatars.php

     
    354354                $id = $user->user_id;
    355355        else if ( is_numeric( $user ) )
    356356                $id = $user;
     357        else if ( is_string( $user ) && ( $user_by_email = get_user_by_email( $user ) ) )
     358                $id = $user_by_email->ID;
    357359        else
    358360                $id = $authordata->ID;
    359361