I don’t believe you are doing anything wrong, I think it is the way the get_users function works https://codex.wordpress.org/Function_Reference/get_users…
search – Use this argument to search users by email address, URL, ID, username or display_name.
Perhaps the phrases you are searching with do not match any of the above as it needs to be a full match unless you use the * wildcard which you can add before, after your search string (or both).
From the above codex link the codex link…
You can also do wild card search by adding an * before or after your search query. For example, to search for all users that start with “jo”, you would pass something like “jo*”.
The results will be all users whose user names, IDs, or emails that start with “jo”. The * can be placed before or after your search query. When placed before, the results will be all users that end in your query.
Related Posts:
- How to display the user that published a pending post?
- How to check if a user is in a specific role?
- Changing Admin Menu Labels
- How to restrict dashboard access to Admins only?
- Admin Page Redirect
- Remove dashboard, use Pages tab as default
- Check if user is admin by user ID
- Add “external” link to admin menu in the backend
- How to remove the site health dashboard widget?
- Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
- Add a button to users.php
- create users to site with specific language
- Copy my user account’s wp-admin dashboard layout to other users?
- Make sub menu items a main link in the admin menu using fuctions.php
- How to disable or hide “collapse menu”
- Dashboard links not working
- Removing admin bar from wordpress dashboard
- Display sortable User meta column in admin panel user’s page
- How to display multiple custom columns in the wp-admin users.php?
- Hooking into register_admin_color_schemes
- Can’t access dashboard, connection times out (other pages work fine)
- Removing user fields [duplicate]
- wp-admin does not redirect to dashboard
- Cannot log into WordPress Dashboard after removing/adding .htaccess
- Custom WordPress Dashboard for Specific user role
- wp-admin edit user url wont show up correct url [closed]
- Users Unable to Access Dashboard/Posts/Pages
- Stop loading “collaborators” users on add new post or page?
- Show Welcome Panel on Dashboard for every user
- Prevent /wp-admin/ from redirecting to homepage?
- How do I set the homepage to the WordPress Admin Dashboard login?
- Distinguish profile user and admin user IDs / get ID of user being edited
- Create a fullwidth dashboard widget
- Uncheck the box “Send User Notification” by default on new-user.php
- Locked Out Of WordPress Admin Dashboard After Server Move
- Detecting all admins that are logged in
- Subscribers become Authors after Upgrade? / Mass Update of Users?
- Stopping user deletion from running on error
- Filter dropdown in users.php “delete user” bulk edit screen
- Add count for new registered user in Users tab
- Users disappeared from wp-admin
- Logout USER form backoffice after 30 minutes of inactivity [closed]
- Wp-admin is giving me an error “Sorry, you are not allowed to access this page.”. I do have access to the wp-admin besides the dashboard itself
- WP-Admin shows (1) update but there is no update for plugin, theme or WordPress
- White screen of death in Dashboard after clean installation
- How do I let logged out users see the dashboard?
- How can I replace dashboard.css and dashboard.min.css (not add new css)
- Hide username discovery
- can not access wp-admin after migrating to openshift
- How to get Role Subscribe Users on Admin Menu only in Pages in WordPress
- How do you force the wordpress dashboard to be 1 coulmn by default?
- I accidentally deleted an admin user and all their content is now gone from the site. [closed]
- How to remove dashboard access (wp-admin) for author but not disable the capabilities?
- Restrict submitters from wp-admin [duplicate]
- always by default show welcome panel in the dashboard
- Dashboard Widget CSS
- Admin top level menu, pointing to an external url
- Nickname field isn’t appearing in Admin
- how can I change the font on Edit Post area (admin dashboard)
- How to allow WordPress updates to only one specific administrator?
- Dashboard : remove Safari navigator message
- Is there a filter to edit html of user-edit.php
- Move WooCommerce menu entries to top of dashboard
- Create new user from phpMyAdmin
- How do I make it so that the all users page is not a white screen?
- Change maxlength of link_description in dashbord link section?
- Can’t save changes or modify settings in Dashboard but Pages and Posts are fine
- define two login page url
- Trying to create a page as a menu item in the admin while keeping the admen panel visible
- Newly created user role not displaying on users screen
- Broken Customizer page
- How to check if a user is in a specific role?
- On Users (user.php) in wp-admin disable/hide “Bulk Actions” and “Change Role To”
- I can’t access my wp admin dashboard
- Step by step guide for new users on how to post content?
- Login issue with subdomain installs
- How to log into WordPress via GET/POST
- Hook into form handle from admin users table
- restrict admin panel sections to users
- CSRF attack to create USER
- Localhost install: Administrator lost administrator access; cannot access Dashboard
- How to keep the plugin submenu open on viewing a custom version of users.php?
- Getting 404s in wp-admin after logged in
- Cannot login in WordPress even after changing hash password in phpmyadmin
- Admin section showing CUSTOM Permalink structure thus resulting in permission error [closed]
- WordPress User profile page fields missing
- Unable to access dashboard (wp-admin) only
- Launch wordpress site to local computer from live website backed-up
- Anyone Can Register
- All of my WordPress sites have Bold Open Sans
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
- Extend user search in the Wp backend area on the users.php page to allow for searching by email domain and role from the “users search” input box
- WordPress Users page missing user count next to different types of users
- How to make the Panel // WP-Admin lighter via Mobile
- How can you change the admin dashboard URL without symlinking?
- Searching for a custom meta from user.php in the admin
- Remove “Time to upgrade” message from dashboard
- Get Stylesheet To Showup in WP Admin Panel Editor
- Can’t call external stylesheet for WordPress admin (using wp_admin_css)?