[wp-trac] [WordPress Trac] #15458: Lazy-load usermeta into the user object

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 4 21:43:41 UTC 2011


#15458: Lazy-load usermeta into the user object
-------------------------+------------------
 Reporter:  nacin        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.3
Component:  Performance  |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by scribu):

 So, WP_User calls get_userdata(), which is a pluggable function.

 Furthermore, get_userdata()'s docs say that it returns "User DB row
 object", but it actually includes metadata too.

 We could make get_userdata() return a WP_User object instead and move the
 query into {{{WP_User::__construct()}}}, but I don't know what implication
 that would have for code that overwrites get_userdata().

 I assume we can't just make get_userdata() not-pluggable anymore.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15458#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list