I know this is old, but this is the best way. Might help people coming here in the future.
$get_users = get_users( array( 'blog_id' => get_current_blog_id() ) );
$user_id = $get_users[0]->ID;
Related Posts:
- Why are my roles not visible in a Multi-site/Network?
- Prevent user creating new users with specific roles
- WPMU – new users are automatically subscribed to the main blog – how to prevent that?
- Update User Role Across Network when Main Site User is Updated
- Assign role to user on first login, if they are first (after admin)
- Make a user administrator to a sub directory site and a contributor to main site in multisite network
- How to change user starting role in WordPress MultiSite?
- Create Custom Multisite User Role to Reduce Capabilities
- Copy user role on multisite so the user can access subsites with same role
- WordPress Multisite Add User
- can’t create user without email for an author after converting single site to multisite
- Easily adding multiple existing users to a multisite site
- A different role for each site in a multisite
- How to create child/sub user under parent user
- How create a multisite setup with “phantom” accounts and passwords?
- Is there any way to give all users access to one blog in a multisite network without using a plugin?
- How To Add Custom Form Fields To The User Profile Page?
- Site admin in a network install can’t edit users?
- How to use same email for multiple users
- Where can I find documentation on what characters are allowed in user names and why?
- How to get current site id? (WPMU)
- wordpress multisite, how to keep user on subdomain throughout registration process?
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- WordPress Multisite – When a user signs-up on main site, how to add the user to a subsite
- How to use alias domain for multisite installation?
- How to enable a site administrator to edit users in a WordPress network/ multisite setup?
- Different back-end colour scheme for the different sites of a multisite
- Set up collaborative site
- get_current_blog_id returns 1 in multisite setting
- Add role across network in multisite
- Restrict users on multisite WordPress install
- Possible to make custom role in multisite that can add sites?
- How does WordPress connect sites and the wp_users table?
- WordPress Multisite Layered Admins
- How to add multiple existing users to a multisite site?
- How To Remove Dashboard Menu Items for Multisite Users?
- Can wp-cli display all users and their roles across all sites in a multisite instance?
- Can simple Admin save options in a Multisite?
- Identical members roles on all sites in a multisite
- How can I get multisite primary blog (url or path) for current user?
- Why can’t I delete original user in multisite? Options for manual removal
- How to add edit users capability to a custom role?
- Get Permalink of Network Blog Post
- In MultiSite, can some users automatically have Site Admin rights on all sites, without granting them Network Admin access?
- create_users capabilities on a role on multisite
- Multisite: I have a gap in my blogs. How to add the missing one?
- Multisite Pull Recent Image Attachments from Blog ID
- Avoid having infinite loops
- Create custom role, multisite, add users/sites?
- Allow Author on Site A capability to upload files on Site B in Multi Site
- Multisite – One user allowed access to all sites?
- How do you disable account activation in WPMU and then log the user in right away?
- Get current Blog ID in Tinymce Plugin Dialog Window in WPMU
- Four columns in the wp_users table
- Subsite access without being a member of the subsite in wp multisite network
- Obtaining user table for one site on multisite set up
- Admin permission for creating blogs in multisite
- How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]
- Get users registered 30 days ago(or more)
- Simplest way to query with blog_id?
- Bulk Move Users from one site to another within a network ( Multisite )
- WordPress Multisite – Load users using custom query
- Multisite – maximum number of users with specific role
- Remove superadmin role from the “change role to” menu in user listing
- How To Disable Add new users On Subsites In Multisite?
- How to sync roles across Multisite?
- How to get blog_id of an MU site when running a custom function on the parent site
- Wait ajax to complete before continue loop
- How to delete user from MU site when the user is removed from their site?
- WordPress multisite, allow non super admins to create sites
- Customize or avoid new admin email address notification
- How to share User Database between Two Multisite Installations + More
- Using Same User Database on Subdomain
- WP MS: How to query over the network
- How to get the blogs owned by a user?
- How to redirect user after session timeout
- WPMU If MU site has no administrator, deactivate site
- Creating teams of users in WordPress
- Give users acces to admin a single post or set up WP network?
- Restrict users of site 1 to login in site 2 in wordpress multisite
- “My Sites” incorrectly showing all network sites for all logged in users
- How to use the same users table on multiple wordpress sites
- Language per user role, how can I achieve this?
- Admin users not able to see network menus
- let user select roles in the wordpress subsites
- Multisite – each site with it’s own set of users
- User Roles in multisite – odd behavior
- WordPress single sign on using cookies with shared user role functionality between more than 2 wordpress subdomains
- Can’t activate a user on multisite install
- Multisite error when adding a user: already a member of this site
- Get current user outside of WordPress Multisite
- WordPress MU users – how are they organized?
- Get users from all/specific blog by user_role and current_user role
- Redirect authors from upload.php url to Home page in Multisite
- How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
- Using a number for limiting registering or banning on multisite
- Unsure of my options, Multi-blog?
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- Multisite Login Access Restrictions
- Change a subsite Admin role of a WordPress Multisite after 24 hours registering