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?
- Where are available Roles Defined in the wp_ database?
- 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?
- Is there a is_user_logged_in() for multisite?
- How to get current site id? (WPMU)
- WordPress Multisite allow site admin to add user without email confirmation
- wordpress multisite, how to keep user on subdomain throughout registration process?
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- Network not displaying all sites and users
- 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?
- Issue with Custom Roles in Multisite
- Give to site admin the option to “skip confirmation email” when adding new user
- 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
- How can I display all Multisite blogs where this user is administrator?
- 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?
- Allowing logged in users to comment without moderation across a multisite installation
- Can you have multi-site WP and keep users separate?
- WordPress Multisite Layered Admins
- How to add multiple existing users to a multisite site?
- How To Remove Dashboard Menu Items for Multisite Users?
- How to get a user role of a specific blog in multisite?
- Can wp-cli display all users and their roles across all sites in a multisite instance?
- the blog owner multisite
- 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
- Can I use multisite functions in a single-site installation?
- 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
- How can I delete a user from entire multisite nework
- delete_user_meta : how to delete all the metadata of a given user (witout SQL)
- How to search users globally on a multisite install?
- Multisite: I have a gap in my blogs. How to add the missing one?
- Multisite Pull Recent Image Attachments from Blog ID
- Within the database, where is the flag which says that a user has Super Admin rights?
- Avoid having infinite loops
- Create custom role, multisite, add users/sites?
- Displaying a message upon user registration
- Query users by capability – uninstall/deactivate callback
- access the plugins for each role in WordPress multisite
- Allow Author on Site A capability to upload files on Site B in Multi Site
- Multisite – One user allowed access to all sites?
- Add a user to a specific blog when they register?
- 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
- Good way to block users within a multisite setup without deleting them?
- Subsite access without being a member of the subsite in wp multisite network
- Multisite user roles – capabilities not working
- Obtaining user table for one site on multisite set up
- WordPress stuck in deleting user
- Restrict Capability of Administrator to Create, Edit and Delete Pages in Multisite
- 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
- Understanding State in WordPress Multisites
- Remove superadmin role from the “change role to” menu in user listing
- How to change a user role after registering in multisite?
- 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
- Delete user from multisite when removed from subsite
- Combining user database tables while keeping all other data in seperate for multiple sites?
- How to fix that new users show up again in subsite of a Multisite?
- Multisite network admin – User’s role not showing up
- How to delete user from MU site when the user is removed from their site?
- Sharing users across multiple sites, each on their own database