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

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 8 22:18:33 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 needs-testing  |
-------------------------------------+------------------

Comment (by ryan):

 get_user_option fails because the isset magic method doesn't consult meta.
 I think we should retain this for back compat.   Since get_metadata()
 returns an empty string even if a meta key is not actually set, I
 introduced isset_metadata() and used it in the isset magic method.  So
 that get_user_option() can once again support meta keys with dashes, I
 also added is_set() and get() methods to WP_User.

 Unit tests are here.

 http://unit-tests.trac.wordpress.org/browser/wp-testcase/test_user.php

 We need more coverage of WP_User() and the functions that wrap it.

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


More information about the wp-trac mailing list