Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: WP_User_Query Search returns all user when search_columns set to user_url #61

Open
burhandodhy opened this issue Oct 10, 2022 · 0 comments
Labels
bug Something isn't working module:users

Comments

@burhandodhy
Copy link
Contributor

When we set the search_columns to user_url in the WP_User_Query. The search result returns all the user whose website value is set.

Steps to Reproduce

  1. Create 3 users.
  2. Set the Website field of one user to https://elasticpress.io and for other 2 users set field to https://example.com
  3. Run the below snippet
add_action( 'init', function() : void {

	$user_query = new \WP_User_Query(
			[
				'ep_integrate' => true,
				'search'        => 'https://elasticpress.io',
				'search_columns' => [ 'user_url' ],
			]
		);

	var_dump( $user_query->results );

}  );

Expected behavior

It should only returns the user who's website field is https://elasticpress.io

@burhandodhy burhandodhy added the bug Something isn't working label Oct 10, 2022
@burhandodhy burhandodhy self-assigned this Oct 10, 2022
@burhandodhy burhandodhy added this to the Future Release milestone Oct 25, 2022
@felipeelia felipeelia transferred this issue from 10up/ElasticPress Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:users
Projects
None yet
Development

No branches or pull requests

2 participants