[wp-trac] [WordPress Trac] #53177: WP_User_Query does not accept fields as string except ID

WordPress Trac noreply at wordpress.org
Wed May 4 03:10:07 UTC 2022


#53177: WP_User_Query does not accept fields as string except ID
-------------------------------------------------+-------------------------
 Reporter:  rilwis                               |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.0
Component:  Users                                |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info has-dev-note has-   |     Focuses:  docs
  patch has-unit-tests needs-docs                |
-------------------------------------------------+-------------------------
Changes (by dd32):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 This behaviour was being relied upon by BuddyPress, and seems that the
 fields that this is now limited to, might not cover all cases used by
 other plugins - particularly authentication or user-sync plugins.

 I'm re-opening this with that in mind,

 https://buddypress.trac.wordpress.org/ticket/8694

 I'll also note, that passing `'fields' => 'all'` to WP_User_Query results
 in it returning more fields than what passing all the 'valid' fields will
 result in.

 eg. passing 'all' allows for returning the `user_pass`,
 `user_activation_key `, `user_status`, `spam`, and `deleted` fields which
 are not present in the allowed fields list in r53255.

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


More information about the wp-trac mailing list