From 66f1454a228a6c4b722cd323c588c456d02147b8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 20 Feb 2008 20:58:58 +0000 Subject: [PATCH] Allow comment object to be passed to get_avatar() for convenience. see #5775 git-svn-id: https://develop.svn.wordpress.org/trunk@6946 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index e4fa9f1cd8..bac66d23fd 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1195,7 +1195,7 @@ function get_avatar( $id_or_email, $size = '96', $default = '' ) { } elseif ( is_object($id_or_email) ) { if ( !empty($id_or_email->user_id) ) { $id = (int) $id_or_email->user_id; - $user = get_userdata(); + $user = get_userdata($id); if ( $user) $email = $user->user_email; } elseif ( !empty($id_or_email->comment_author_email) ) {