WordPress.org

Make WordPress Core

Changeset 26000


Ignore:
Timestamp:
11/02/2013 12:19:43 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Fall back to comment author email in get_avatar() if the user who left the comment no longer exists.

props mauryaratan, lite3.
fixes #25803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r25899 r26000  
    16461646            return false;
    16471647
    1648         if ( !empty($id_or_email->user_id) ) {
     1648        if ( ! empty( $id_or_email->user_id ) ) {
    16491649            $id = (int) $id_or_email->user_id;
    16501650            $user = get_userdata($id);
    1651             if ( $user)
     1651            if ( $user )
    16521652                $email = $user->user_email;
    1653         } elseif ( !empty($id_or_email->comment_author_email) ) {
     1653        }
     1654
     1655        if ( ! $email && ! empty( $id_or_email->comment_author_email ) )
    16541656            $email = $id_or_email->comment_author_email;
    1655         }
    16561657    } else {
    16571658        $email = $id_or_email;
Note: See TracChangeset for help on using the changeset viewer.