[wp-trac] [WordPress Trac] #20095: get_users() doesn't allow hyphens in meta_key parameter

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 22 02:29:04 UTC 2012


#20095: get_users() doesn't allow hyphens in meta_key parameter
--------------------------+-----------------------------
 Reporter:  mordauk       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:  3.3.1
 Severity:  normal        |   Keywords:  needs-testing
--------------------------+-----------------------------
 When retrieving users with the get_users() function, the meta_key
 parameter does not work if the key contains a hyphen (dash).

 For example:


 {{{
 $members = get_users(array(
                 'meta_key' => 'job-seeking',
                 'meta_value' => 1,
         )
 );
 }}}

 That will result in no members being found, even though at least one user
 with a meta_key of "job-seeking" with a value of 1 does exist.

 This, however, will work:

 {{{
 $members = get_users(array(
                 'meta_key' => 'job_seeking',
                 'meta_value' => 1,
         )
 );
 }}}

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


More information about the wp-trac mailing list