Opened 13 years ago
Closed 9 years ago
#19765 closed defect (bug) (duplicate)
site-users.php in network admin doesn't display users with custom roles
Reported by: | wpdavis | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Users | Keywords: | has-patch needs-refresh |
Focuses: | administration, multisite | Cc: |
Description
In the network admin when looking at the users of a specific site, if the site has a custom role the users with that role will not show up. The patch attached ensures that switch_to_blog() is used at the correct places so that data is being gathered from the correct site, not from the main site.
Attachments (3)
Change History (10)
#3
@
13 years ago
Which switch_to_blog are you referring to? The one I added in prepare_items is necessary for the query for custom roles to run correctly — without it, when you look for all users with custom_role it returns nothing.
Note: See
TracTickets for help on using
tickets.
I would think that a switch_to_blog() is unnecessary here. We know the user's roles from the meta key, or at least the role's key ("administrator" rather than "Administrator"). We should be able to display the role's key in the case where the role is not registered on the main site.
Perhaps we should have a switch_to_blog() for larger reasons. PeteMall?