It was narrated from Rifa'ah bin Rafi' that while the Messenger of Allah (S.A.W) was sitting in the row for prayer. The Hadith.
With this chain, At-Tirmidhi recorded it (No. 302) and An-Nasai in Al-Kubra (No. 1631). It is the narration about the man who prayed incorrectly, and in it, the Prophet instructed him:
Ali ibn Hujr informed us: Isma'il informed us: Yahya ibn Ali ibn Yahya ibn Khallad ibn Rifa'ah ibn Rafi' al-Zuraqi narrated to us, from his father, from his grandfather, from Rifa'ah ibn Rafi' رضي الله تعالى عنه.
While the Messenger of Allah صلى الله عليه وآله وسلم was sitting in the prayer row — the hadith.