<?php

namespace WP_CLI\Fetchers;

class User extends Base {

	protected $msg = "Invalid user ID or login: '%s'";

	public function get( $id_or_login ) {
		if ( is_numeric( $id_or_login ) )
			$user = get_user_by( 'id', $id_or_login );
		else
			$user = get_user_by( 'login', $id_or_login );

		return $user;
	}
}


<?php

namespace WP_CLI\Fetchers;

class User extends Base {

	protected $msg = "Invalid user ID, email or login: '%s'";

	public function get( $id_email_or_login ) {

		if ( is_email( $id_email_or_login ) )
			$user = get_user_by( 'email', $id_email_or_login );
		else if ( is_numeric( $id_email_or_login ) )
			$user = get_user_by( 'id', $id_email_or_login );
		else
			$user = get_user_by( 'login', $id_email_or_login );

		return $user;
	}
}


Support for `user_email` as a third type of argument that can be passed to `<user>`
Support for `user_email` as a third type of argument that can be passed to `<user>`
