Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#15053 closed enhancement (fixed)

Site options page displays complete users list - no way of interaction

Reported by: mwidmann's profile mwidmann Owned by:
Milestone: 3.1 Priority: normal
Severity: major Version: 3.0.1
Component: Multisite Keywords:
Focuses: Cc:


I have ~4k users in a multisite site. Accessing the site options for this site displays ALL users of the site. This is very slow and takes many resources I don't need.

Neither the ms-sites.php nor get_users_of_blog( $id ) offers a way of changing this behavior by applying filters or actions.

The only way I can apply changes atm is to apply a filter to $wpdb->query()'s query , which imo is not very elegant and would mean too much overhead.

The best solution would be to add a filter to define what get_users_of_blog queries.

Changing the behavior would require to re-think the whole workflow of changing the roles for users on sites in a multisite environment. Maybe by adding functionality to the edit user pane.

Attachments (1)

get_users.diff (1.9 KB) - added by scribu 13 years ago.
Call get_users() directly

Download all attachments as: .zip

Change History (10)

#1 @scribu
13 years ago

As a workaround, you can use remove_meta_box() to disable the Site Users box altogether.

#2 @ryan
13 years ago

network/sites.php also calls get_users_of_blog() and then only shows 5 users despite fetching all of them.

#3 @ryan
13 years ago

  • Milestone changed from Awaiting Review to 3.1

#4 @ryan
13 years ago

A good start might be to add a $args argument to get_user_of_blog() which is passed on to get_users(). This would allow sites.php to request 6 users since that is all that is needed to list 5 and determine if there are more.

Options should have a limit of 10 or so and then link to the blog's users.php if managing more is needed. Listing them all in a huge list in an un-paged interface is ridiculous.

#5 @ryan
13 years ago

[15876] Add query args argument to get_users_of_blog(). Limit number of users fetched for user lists in sites table and edit blog form. see #15053

13 years ago

Call get_users() directly

#6 @scribu
13 years ago

There's no point in adding $args to get_users_of_blog(), unless we apply a 'get_users_of_blog' filter, like we do in get_blogs_of_user()

get_users.diff calls get_users() directly.

#7 @ryan
13 years ago

(In [15882]) Use get_users() instead of get_users_of_blog(). Props scribu. see #15053

#8 @nacin
13 years ago

Got the last part out in [15883].

#9 @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.