[wp-trac] [WordPress Trac] #22212: WP_User_Query( array('role' => $role) ) should accept array or not return anything if array

WordPress Trac noreply at wordpress.org
Wed Oct 7 03:25:14 UTC 2015


#22212: WP_User_Query( array('role' => $role) ) should accept array or not return
anything if array
--------------------------------------+---------------------------
 Reporter:  thomask                   |       Owner:  boonebgorges
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.4
Component:  Users                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------

Comment (by boonebgorges):

 Whoops. Sorry about the debacle.

 To be more specific, the `$blog_id` parameter was broken only when not
 combined with one of the 'role' parameters. [attachment:22212.diff] fixes
 this by doing a key-only lookup (which will match any role) when no role
 has been specified. There's also a unit test in there.

 Feeling a tad gun-shy, so I'd appreciate a look from one of my esteemed
 colleagues.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22212#comment:57>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list