[wp-trac] [WordPress Trac] #8940: Use ID instead of email for get_avatar() in user_row() - makes more sense and hurts nothing

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 23 23:02:14 GMT 2009


#8940: Use ID instead of email for get_avatar() in user_row() - makes more sense
and hurts nothing
--------------------------+-------------------------------------------------
 Reporter:  jeremyclarke  |       Owner:  jeremyclarke
     Type:  defect (bug)  |      Status:  new         
 Priority:  normal        |   Milestone:  2.8         
Component:  Plugins       |     Version:  2.8         
 Severity:  normal        |    Keywords:  has-patch   
--------------------------+-------------------------------------------------
 get_avatar() can take either an ID or an email as the first argument and
 deals with it intelligently.

 Right now in the user_row() function, which generates the table of users
 in wp-admin/users.php, the get_avatar() function is called using the
 user's email address.

 This is causing me problems because for internal caching reasons my
 rewrite of get_avatar (its in pluggable.php) does checking against user
 id's for local avatars but just gets gravatars for emails. This saves me
 from loading user objects by calling get_user_by_email().

 In all other parts of the code (specifically in get_avatar() itself) ID's
 are prioritized over emails. I think it makes sense for user_row() to use
 ID as well. If you have a more accurate identifier then you might as well
 use it right?

 The attached patch just changes what part of the user object is called and
 should have no effect at all on anything other than my problem :)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8940>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list