WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11086 closed defect (bug) (fixed)

Don't query against entire users table in wp_dropdown_users()

Reported by: ryan Owned by: ryan
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Users Keywords: has-patch early
Focuses: multisite Cc:

Description

To be MU friendly, wp_dropdown_users() should use get_users_of_blog() or a like query.

Attachments (3)

11086-wp_dropdown_users.diff (1.7 KB) - added by nacin 4 years ago.
11086-wp_dropdown_users.2.diff (809 bytes) - added by nacin 4 years ago.
11086-wp_dropdown_users.3.diff (810 bytes) - added by nacin 4 years ago.
Missing semi-colon.

Download all attachments as: .zip

Change History (10)

comment:1 nacin4 years ago

  • Keywords has-patch added
  • Version changed from 2.8.5 to 2.9

comment:2 nacin4 years ago

Pretty sure we'd need $wpdb->get_blog_prefix in non-MU WP to be able to add $blog_id as an argument. First patch was incomplete in that regard, I thought I had pulled the $blog_id code before patching.

nacin4 years ago

Missing semi-colon.

comment:3 ryan4 years ago

  • Keywords early added
  • Milestone changed from 2.9 to 3.0

Thanks for the patch. It looks good, but let's postpone this to 3.0.

comment:4 nacin4 years ago

  • Keywords multisite added

comment:5 nacin4 years ago

Patch still applies clean (thought offset) on r12962.

comment:6 nacin4 years ago

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

(In [13122]) Don't query against entire users table in wp_dropdown_users() to be multisite friendly. Fixes #11086

comment:7 nacin4 years ago

(In [13123]) s/$blog/$blog_id/ as an argument in wp_dropdown_users(), for consistency, see #11086

Note: See TracTickets for help on using tickets.