Yahoo was forbidden from disclosing the order and the collection is no longer taking place, The New York Times reports.