Jabir bin Abdullah reported,

Sulayk al-Ghatafani entered the mosque while the Prophet ﷺ was delivering the sermon.The Prophet ﷺ asked him, "Have you prayed?"He replied, "No."The Prophet ﷺ said, "Then pray two rakahs."As for Amr, he did not mention Sulayk by name.

Ibn Majah 1112

Sahih

حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن عمرو بن دينار سمع جابرا وأبو الزبير سمع

جابر بن عبد الله قال

دخل سليك الغطفاني المسجد والنبي ﷺ يخطب فقال أصليت قال لا قال فصل ركعتين وأما عمرو فلم يذكر سليكا

ابن ماجه 1112صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
One who enters the masjid while the imam is delivering the sermon
Numbering
Darussalam 1112
Ibn Majah 1112