He heard him say, "I attended the Eid al-Adha prayer with the Messenger of Allah ﷺ. Some people had slaughtered their sacrifices before the prayer, so the Prophet ﷺ said, 'Whoever among you slaughtered before the prayer must repeat his sacrifice, and whoever has not yet slaughtered should do so in the name of Allah.'"
حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن الأسود ابن قيس
أنه سمعه يقول شهدت الأضحى مع رسول الله ﷺ فذبح أناس قبل الصلاة فقال النبي ﷺ من كان ذبح منكم قبل الصلاة فليعد أضحيته ومن لا فليذبح على اسم الله
No references are available.
Bukhari narrated it in his chapter on sacrifices, "Whoever slaughters before the prayer should repeat it," Hadith 5562 and elsewhere, from the hadith of Aswad, with this wording. Muslim narrated it in his chapter on sacrifices, "Its time," Hadith 2/1960b, from the hadith of Ibn Uyayna, with this wording.