Skip to:
Content

BuddyPress.org

Changeset 11633


Ignore:
Timestamp:
07/10/2017 05:34:25 PM (2 years ago)
Author:
r-a-y
Message:

Avatars: After r11627, move email check after user object checks.

Avoids notices from occurring.

See #7424.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-avatars.php

    r11631 r11633  
    13781378    if ( is_numeric( $id_or_email ) ) {
    13791379        $user = get_user_by( 'id', absint( $id_or_email ) );
    1380     } elseif ( is_email( $id_or_email ) ) {
    1381         $user = get_user_by( 'email', $id_or_email );
    13821380    } elseif ( $id_or_email instanceof WP_User ) {
    13831381        // User Object
     
    13881386    } elseif ( $id_or_email instanceof WP_Comment && ! empty( $id_or_email->user_id ) ) {
    13891387        $user = get_user_by( 'id', (int) $id_or_email->user_id );
     1388    } elseif ( is_email( $id_or_email ) ) {
     1389        $user = get_user_by( 'email', $id_or_email );
    13901390    }
    13911391
Note: See TracChangeset for help on using the changeset viewer.