The include
key on get_users
requires an array of IDs (numbers). You are giving it an array of objects that have an ID property. If you look at your first var dump you will see this. WP is casting that to a number and returning the user with that number which is not what you want.
Related Posts:
- create front-end users post list by specific category
- php return username of currently viewed author profile
- How to block specific user id in custom login form?
- Get current user id in function php
- main menu page redirects to user ID
- how to get page id of a page using page slug
- Create a global variable for use in all templates
- Add extra field to users
- Integrating WordPress to my website, while keeping my own authentication system
- Display user’s total comment count outside The Loop
- Changing user_nicename
- How to auto login user again after change user_login
- What is the most efficient way to search users by their display name?
- Can i check if user is doing any ajax request?
- How do I create a WP user outside of WordPress and auto login?
- Network installation giving errors when viewing or adding a user
- Showing user ID on user main page from screen options
- Getting the Current User
- How do I hide specific user profile fields?
- Authenticating to WordPress, using my own authentication two-factor system
- How to track a users progress through pages by inserting data into WordPress Database?
- automated tests as a user?
- How can I default to all WordPress roles when parameter is not included in shortcode?
- there’s a way to include a minimal WP for check only the current user, its roles (caps?) and then release/free it?
- Delete option value from array using update_option()
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Passing the page ID to a login php script
- List User order by ID in Descending order (Backend)
- Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
- Get all user meta by meta key instead of ID
- How to get a list of all possible values of a specific user meta key?
- User’s total comment count excluding comments on their own posts
- User management system similar to wordpress one?
- Show all posts by author
- Custom user login page by creating a plugin
- Programmatic Login from 3rd Party site
- Add New User, extra fields which are required?
- user_profile_update_errors hook not executing
- Modify user profile data through scripting?
- Get users that likes the post
- get_users meta_query: REGEXP not working for matching new lines
- Change CSS based on is_user_logged_in
- How to show a users bio on a page
- “operation successful” message
- Making (and edit existing) posts with ID included
- php if username is role
- Help getting previously visited pages ID
- How do you create two separate Register pages?
- get_the_ID() in the footer returns wrong value
- Use post ID in functions.php file adminside
- Is it possible to create new user from external form using REST API?
- Foreach loop inside an array_merge
- Show current user posts only
- echo esc_url( get_permalink($post->ID) + complete the ID’s url
- Change page password every day (predictable password ;) )
- show something only when user comes from specific page at remote host?
- Get the users that my following users are following
- Show site content based on user role
- ‘pre_user_query’ interfering with user export
- How to list users like an archive page 10 users on page and have navigations
- How can I call a specific file (via php) by referencing the logged-in username?
- Redirect to current user page upon link click
- Use of antispambot with $curauth->email
- Uses for function: wp_update_user
- Display additional user fields
- Generate a QR code when creating a new WordPress user
- Give ID to divs inside the loop
- Change wordpress’ database data using ajax – how to get current user id?
- Sort new column in Users wp-admin
- Sort column in Users admin Tab
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Woocommerce display orders with products from specific categories to specific admins
- Storing huge number of users in wordpress
- Admin Panel 404 Error after login
- How to count active users on a specific page
- how can I call a function when time expire
- Hide Approved status for certain users in users list
- Call WP Rest-Api to GET /users/me returned NOTHING in console
- Trying to get post ID outside loop on blog page
- Uploading/integrating custom user registration page
- If user has clicked link add class and store using PHP/WordPress
- Trying to get property ‘ID’ and ‘post_author’ of non-object error
- How to get the url of the entry in which an image belongs
- Store data from JavaScript object to custom table in user account
- Export WordPress User Meta to CSV/Excel
- Page template not working when logged out
- Allow specific user to edit a specific page
- How to change the value of a variable using input field?
- Display current user metadata on WordPress page
- How do I track which user clicked my button?
- Help hooking into user_register
- Use WP user status (logged_in) to manage access to independent application
- Add another role to a user when they click a button?
- Query to show average # of months all accounts with specific role have been active
- is_user_logged_in() not working in homepage
- wordpress more than one ajax request at the same time issue
- (Who to follow) Twitter widget
- Can’t get_users info by using json_encode
- Editable Student file associated with basic User ID
- Adding users to another blog