public static function oneByEmail($email)
	{
		if (!filter_var($email, FILTER_VALIDATE_EMAIL))
		{
			return self::oneByUsername($email);
		}

		return self::all()
			->whereEquals('email', $email)
			->row();
	}
public static function oneByEmail($email)
	{
		if (!filter_var($email, FILTER_VALIDATE_EMAIL))
		{
			return self::oneByUsername($email);
		}

		return self::all()
			->whereEquals('email', $email)
			->row();
	}
public static function oneByEmail ( $ email ) { if ( ! filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { return self :: oneByUsername ( $ email ) ; } return self :: all ( ) -> whereEquals ( 'email' , $ email ) -> row ( ) ; }
Finds a user by email

@param   string  $email
@return  object
@since   2.1.0
Finds a user by email