Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#21286 closed enhancement (duplicate)

Add filter to wp_dropdown_users to help huge networks

Reported by: wonderboymusic's profile wonderboymusic Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Users Keywords: has-patch
Focuses: Cc:

Description

wp_dropdown_users( ) currently has a filter, but it only filters the output. The query args need to be filterable, otherwise sites with a huge number of users cannot turn off or limit this function.

Gravity Forms calls this function in the admin, which causes PHP to run out of memory easily when you have 1,000,000 users. Other plugins can call this at will.

I have added a new filter for dropdown_users_args in my patch

Attachments (1)

dropdown-users.diff (525 bytes) - added by wonderboymusic 13 years ago.

Download all attachments as: .zip

Change History (8)

#1 @wonderboymusic
13 years ago

  • Type changed from defect (bug) to enhancement

#2 @johnbillion
13 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

See #19867 which has a similar patch plus one for autocomplete functionality.

#3 follow-up: @alexvorn2
13 years ago

I don't understand how scalable will help... having many users means having a big database, so splitting the table of the users to many other databases on different servers will help, but I could not figure out how to do this...
Like facebook having 500 million users... build on a farm of thousand servers that do the same task...

#4 @ocean90
13 years ago

  • Milestone Awaiting Review deleted

#5 in reply to: ↑ 3 @wonderboymusic
13 years ago

Replying to alexvorn2:

I don't understand how scalable will help... having many users means having a big database, so splitting the table of the users to many other databases on different servers will help, but I could not figure out how to do this...
Like facebook having 500 million users... build on a farm of thousand servers that do the same task...

Most of the WordPress queries for users completely fall apart when you have a large number of users - this was trying to address one of those instances.

#6 @johnjamesjacoby
10 years ago

Just bumped into this. The attached patch provides a helpful way for developers to circumvent the issue without affecting existing core behavior. +1

#7 @DrLightman
10 years ago

This must be fixed asap, please.

Note: See TracTickets for help on using tickets.