Make WordPress Core

Opened 11 years ago

Last modified 6 years ago

#25765 new enhancement

Directory of users, listing with the role

Reported by: valeriosza's profile valeriosza Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords: needs-patch
Focuses: Cc:

Description

It took me a list of users, with a large site with many levels to know what are administrators, a simple list and still continue seeing the other functions.

Attachments (1)

patch#25765.patch (374 bytes) - added by valeriosza 11 years ago.
class-wp-users-list-table with role

Download all attachments as: .zip

Change History (7)

@valeriosza
11 years ago

class-wp-users-list-table with role

#1 @valeriosza
11 years ago

  • Cc valeriosza@… added

#2 @helen
11 years ago

  • Keywords close added
  • Version trunk deleted

I take it you want to sort by role name, which is not exactly feasible on the query level. Did you test your patch? I would be quite shocked if it worked as-is.

Also note that users can actually have more than one role.

#3 @valeriosza
11 years ago

I sent the patch because I talked to several people, at least for us with large-scale sites was great need for sites with more than 400 users. The filter option does not allow show managers and employees at the same time, for example.

#4 @SergeyBiryukov
11 years ago

The patch doesn't work as expected.

It makes the Role column sortable, and orderby=role is then added to the URL, but WP_User_Query cannot order by role, so it falls back to sorting by user_login: tags/3.7.1/src/wp-includes/user.php#L421.

This can probably be implemented in a plugin though. manage_users_sortable_columns and pre_user_query filters might be helpful.

#6 @wonderboymusic
9 years ago

  • Keywords needs-patch added; close removed
Note: See TracTickets for help on using tickets.