<commit_before><?php

namespace WP_CLI\Fetchers;

use WP_User;

/**
 * Fetch a WordPress user based on one of its attributes.
 */
class User extends Base {

	/**
	 * The message to display when an item is not found.
	 *
	 * @var string
	 */
	protected $msg = "Invalid user ID, email or login: '%s'";

	/**
	 * Get a user object by one of its identifying attributes.
	 *
	 * @param string $arg The raw CLI argument.
	 * @return WP_User|false The item if found; false otherwise.
	 */
	public function get( $arg ) {

		if ( is_numeric( $arg ) ) {
			$users = get_users( [ 'include' => [ (int) $arg ] ] );
		} elseif ( is_email( $arg ) ) {
			$users = get_users(
				[
					'search'         => $arg,
					'search_columns' => [ 'user_email' ],
				]
			);
			// Logins can be emails.
			if ( ! $user ) {
				$users = get_users( [ 'login' => $arg ] );
			}
		} else {
			$users = get_users( [ 'login' => $arg ] );
		}

		return is_array( $users ) ? $users[0] : false;
	}
}
<commit_msg>Fix bad conditional<commit_after><?php

namespace WP_CLI\Fetchers;

use WP_User;

/**
 * Fetch a WordPress user based on one of its attributes.
 */
class User extends Base {

	/**
	 * The message to display when an item is not found.
	 *
	 * @var string
	 */
	protected $msg = "Invalid user ID, email or login: '%s'";

	/**
	 * Get a user object by one of its identifying attributes.
	 *
	 * @param string $arg The raw CLI argument.
	 * @return WP_User|false The item if found; false otherwise.
	 */
	public function get( $arg ) {

		if ( is_numeric( $arg ) ) {
			$users = get_users( [ 'include' => [ (int) $arg ] ] );
		} elseif ( is_email( $arg ) ) {
			$users = get_users(
				[
					'search'         => $arg,
					'search_columns' => [ 'user_email' ],
				]
			);
			// Logins can be emails.
			if ( ! $users ) {
				$users = get_users( [ 'login' => $arg ] );
			}
		} else {
			$users = get_users( [ 'login' => $arg ] );
		}

		return is_array( $users ) ? $users[0] : false;
	}
}

{'fraction_non_alphanumeric': 0.15776081424936386, 'fraction_numerical': 0.0010178117048346056, 'mean_word_length': 2.492007104795737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1526840', 'n_tokens_mistral': 780, 'n_tokens_neox': 684, 'n_words': 214}