• Thank you for that great plugin! It works well, but in a widget with comments the same person was shown with a different avatar. The reason was that it used the email address instead of the name.

    I found a fix, but I haven’t tested it properly. In the method “set_comment_avatar” (around line 323) use:

    
    } else { // it must be email
    	$email = $id_or_email;
    	$user = get_user_by('email', $email);
    	if (empty($user)) {
    		global $wpdb;
    		$user = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_author_email = '%s'", $email) );
    		$name = $user->comment_author;
    	}
    }
    

    So if there is an email and $user cannot be retrieved, it gets the name directly from the database.

    • This topic was modified 7 years, 3 months ago by Christoph.
  • The topic ‘Wrong letter in widgets’ is closed to new replies.