You can use get_blogs_of_user()
to get all the blogs of a given user.
So to get a list sorted by the users:
global $wpdb;
$blogs = array();
$user_ids = $wpdb->get_col( 'SELECT ID FROM $wpdb->users' );
foreach( $user_ids as $user_id ) {
$blogs[$user_id] = get_blogs_of_user( $user_id );
}
// you can use var_dump( $blogs ); to see what's in the $blogs array
Related Posts:
- find a random blogid across my multisite network that has at least one post published
- Built to scale, or worry later?
- Using $wpdb Class to Pull Recent Comments Across a Network
- Split a database will improve performance?
- Within the database, where is the flag which says that a user has Super Admin rights?
- Performance on WPMS
- Bulk activate a theme on multisite
- Removing a wordpress multisite installation and preserving the database before migrate to nginx
- Database Tables Lost Indexes? How to Recover?
- Pushing stored procedure to a multisite database in WordPress
- Query to import data from one MultiSite table to another (pages/sub-pages)
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- Obtaining user table for one site on multisite set up
- new multisite, old db
- Renaming admin user on multisite install by MySQL
- Set up Network Locally on a Flash Drive
- Delete all user’s meta without knowing all the ‘key’
- WP MultiSite: Can’t select database error after changing to new domain
- add_blog_option blog ID
- How to create a blogs category page with Blog-Types Plugin
- Can I use the main Multisite as a backend only?
- Search returns “Nothing Found” on a sub directory
- How To Upload Existing WordPress Site To WordPress Multisite Using SSH
- WordPress Multisite with thousands of blog
- Get multisite count without php?
- WordPress and SQL – Update and Insert from another table if column value doesn’t exist
- MySql Database In WordPress Multisite
- Multisite Tables the same as Single Install?
- Plugin data shared in Multisite
- Merging versions of wp_posts based on post_title
- Too much slow queries with my multisite
- What are options are there to implement a multi language site
- Where is the robots.txt stored for a WordPress Multisite install?
- WordPress Multisite Multiple child theme
- Create multiple subdomains for multi-site from a database
- How to map a specific multi-site blog to a folder?
- WordPress Multisite. Can domain be used instead of subdomain?
- Multisite Subdomains result in 403 Forbidden
- Set subdomains live in a next step
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- Is there any fundamental difference in developing a wordpress multi-network site?
- merging two multisites
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- (How) Can I change my Multisite Network to use a different blog as Primary?
- Multisite non www domain gives registration error but should redirect to www.domain.com
- WordPress multisite htaccess
- get_current_site() not returning site name
- Add custom user fields in Multisite USERS page
- WordPress multisite with multiple parent domains
- WP 4.4 – domain mapping for sites within a multisite network?
- Can I use two different domain names with a WordPress multisite network?
- How to disable the default WordPress redirect to non-www URLs?
- Bulk theme settings in wordpress multisite
- Should I use a multisite installation to achieve a multi-language site?
- Multisite domain naming
- Switch a single site to a multi-site
- migrate a MU sub blog to a single install
- Preferred method of setting user role only works on Main Site in Network
- Register submenu on network menu from the subsite
- Multisite sub-directories IIS 7.5 change media/uploads location
- One Domain, Two Installs of WordPress
- add_rewrite_rule not working in WordPress Multisite
- Create a page for a theme only
- How do I find where the current value of the option ‘registration’ in the SQL database?
- Can’t access Dashboard of a Multisite WordPress. Chrome results in “ERR_TOO_MANY_REDIRECTS”
- How do I get the site url from a Block (within the block editor)
- Strange multisite issue where all sites return same id with get_current_site()
- Creating a subdomain network in a subdomain
- Multisite – One Site with multiple URLs
- Sub-sub folders of WordPress Multisite subdirectory
- Allow editors to switch sites (Multisite)
- moving tables between multisite installs
- Best Practise: Linking to WPMU sites from other sites
- Stylesheet and JS linking error in WP multisite nested path
- Can I run multiple blogs from my local machine
- Trouble with SQL SELECT inside switch_to_blog()
- WordPress Multisite and how to apply sef urls only to specific sites
- Custom css – WordPress Multisite
- Migrating from domain mapping plugin to native domain mapping
- “Multisite support is not enabled.” After Multisite Config Changes
- String translation within WordPress multisite with i18n not working on all sites
- Add new sites on the same level as the parent URL in a multisite
- Define default settings for new sites on multisite network with mu-plugin
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- Multisite + wp_mail – Route Via Site Conditionally
- WordPress automatic Login on other page?
- Multisite: How to bypass wpmu_signup_user_notification and add my own notification logic?
- Changed singlesite to multisite, but new site shows Maintenance
- Multisite Demo Data for New Site
- Responsive Wordress Site – Serve different post types to each device
- Should I use MultiSite for a subdomain based wp site?
- How to apply specific plugins to affect all sites (Multisite Network)
- Admin user getting redirected to /wp-admin/user
- Is there a way to have wordpress 301 versus 302 urls by default?
- first load of the page gives 404 error
- Some Subdomains on a Multisite Install Not Found
- personal_options hook on WordPress multisite
- Multi site root site installed on subdomain, with child sites as subdirectories
- Integrating WordPress for blog and other content pages in a web app
- WordPress MU: Cookie error when trying to login on network WP instance