Opened 3 months ago
Last modified 3 months ago
#23413 new enhancement
Provide query result data to custom user columns
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
When the filter manage_users_custom_column is triggered, it sends an empty string for the value field.
Since it's easy enough to extend the WP_User_Query with extra fields, it would be good to have those fields passed through if they exist to save having to requery the database with the user_id parameter to get the data.
I have attached a patch to show what I mean.
Attachments (1)
Note: See
TracTickets for help on using
tickets.

I guess plugins might expect an empty string. An example:
http://plugins.trac.wordpress.org/browser/document-repository/tags/0.2.4/user-roles.php#L82
Another option might be to pass $user_object as the fourth parameter.
The filter is also used in class-wp-ms-users-list-table.php:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/class-wp-ms-users-list-table.php#L262