Title: network users sort by role
Last modified: November 4, 2020

---

# network users sort by role

 *  Resolved [majahjemmesider](https://wordpress.org/support/users/majahjemmesider/)
 * (@majahjemmesider)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/network-users-sort-by-role/)
 * Hi,
 * I would like to hear if there are a possibility in the list of all subsites users
   on:
    /wp-admin/network/users.php to get listed/sorted according to the different
   user roles the users have.
 * In the top, I can sort on Superadmins or a all users, but I would like to get
   an overview of all the administrators connected to all the sites in the multisite
   setup.
 * Does anyone know a way to achieve this?
 * Looking forward to your answers.
 * Brgds,
    Maja
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnetwork-users-sort-by-role%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/network-users-sort-by-role/#post-13631442)
 * Because the same user’s roles can vary from site to site, it’s not a simple list
   to compile because of how user roles are saved in the DB. I don’t think it’s 
   possible using the filtering links at the top of the table. It would be possible
   to query for all distinct user IDs that have the administrator role by way of
   a raw mySQL query on the usermeta table where meta_key is like `%capabilities`
   and meta_value is like `%administrator%`.
 * The query can be made and results presented from a separate custom admin page.
   I don’t know how one would get the default list table to behave as you want though.
 *  Thread Starter [majahjemmesider](https://wordpress.org/support/users/majahjemmesider/)
 * (@majahjemmesider)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/network-users-sort-by-role/#post-13653362)
 * Thank you [@bcworkz](https://wordpress.org/support/users/bcworkz/) – I guess 
   I will have to make another page, showing the administrators of all sites. Do
   you by any chance know what the value and key would be, if I would like to get
   the following information on the administrators:
 * Username
    Name Site dependency (Administrator on which site) Email
 * If possibly with a link to the users.
 * Brgds,
    Maja
 *  Thread Starter [majahjemmesider](https://wordpress.org/support/users/majahjemmesider/)
 * (@majahjemmesider)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/network-users-sort-by-role/#post-13653897)
 * I found my way, by making a Custom admin page as suggested by [@bcworkz](https://wordpress.org/support/users/bcworkz/)–
   Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘network users sort by role’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 3 replies
 * 2 participants
 * Last reply from: [majahjemmesider](https://wordpress.org/support/users/majahjemmesider/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/network-users-sort-by-role/#post-13653897)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
