WordPress.org

Make WordPress Core

Opened 9 months ago

#46562 new enhancement

Add rand orderby to the WP_User_Query and get_users to match get_posts

Reported by: garrett-eclipse Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.2.1
Component: Users Keywords:
Focuses: Cc:
PR Number:

Description

Hello,

I understand that #23368 and #20606 were closed as wontfix for this request but I wanted to raise it to discussion again.

I understand there's a filter to allow you to custom code this;
http://www.codecheese.com/2014/05/order-wordpress-users-random/

And the concerns on larger databases;
http://www.titov.net/2005/09/21/do-not-use-order-by-rand-or-how-to-get-random-rows-from-table/

But from a developer standpoint could their life not be made easier by the param and simply accommodate the concerns by adding a note to the Codex?

Then a developer can just add a single arg rather than write a pre_user_query which has the potential for conflicting with any other pre_user_query if it's not setup properly?

I appreciate you taking this into account again and understand if there's no desire to implement this. I'm just thinking it would be nice to have parity between user and post queries.

Cheers

Change History (0)

Note: See TracTickets for help on using tickets.