[wp-trac] [WordPress Trac] #60608: Missing REST API users endpoint orderby parameters

WordPress Trac noreply at wordpress.org
Thu Feb 22 17:27:54 UTC 2024


#60608: Missing REST API users endpoint orderby parameters
----------------------------+-----------------------------
 Reporter:  helgatheviking  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 [Allowed orderby params in users endpoint](https://github.com/WordPress
 /wordpress-develop/blob/4a3240eb8f4be840ad495302d66f2329d0827179/src/wp-
 includes/rest-api/endpoints/class-wp-rest-users-
 controller.php#L1548-L1555)

 compared to

 [Supported orderby params in
 `WP_Users_Query`](https://github.com/WordPress/wordpress-
 develop/blob/4a3240eb8f4be840ad495302d66f2329d0827179/src/wp-includes
 /class-wp-user-query.php#L194-L209)

 The rest endpoint is missing support for ordering by
 - 'user_login' (or 'login')
 - 'post_count'
 - 'meta_value',
 - 'meta_value_num'
 - 'login__in'

 I don't know how complex the meta would be, nor do I fully understand what
 `login__in` actually does, but for sure the endpoint is missing the
 ability to order by the user's login/username which can be different from
 the nicename.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60608>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list