[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
Mon Sep 21 13:05:44 UTC 2015


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

Comment (by tifosi):

 Was considering logging an enhancement for the 'role' arg in WP_User_Query
 until I found this and saw that you were considering the 'role__in'
 argument for 4.4+.

 I'm looking for the reverse where I can get all users those with a
 particular role, e.g. all except administrators. Useful for custom plugin
 user listing screens.

 Would welcome also the role__not_in argument as well. Would bring it in
 line with WP_Query and it's __in & __not_in query parameters.

 Thanks

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


More information about the wp-trac mailing list