Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5212al-Ḥasan b. ʿAlī > Yazīd b. Hārūn > al-Ḥajjāj b. Ḥassān > Muqātil b. Ḥayyān Rafaʿah

[Machine] The Prophet ﷺ said, "If a person comes and does not find anyone, let him join a group and stand with them. How great is the reward of the one who stands with them." Muhammad ibn Muhammad informed us, Abu al-Hasan al-Fasawi narrated to us, Abu Ali al-Lulu'i informed us, Abu Dawud mentioned it. It has also been narrated from another perspective about the Prophet ﷺ regarding the matter of repeating (the prayer).  

البيهقي:٥٢١٢عَنِ الْحَسَنِ بْنِ عَلِيٍّ عَنْ يَزِيدَ بْنِ هَارُونَ عَنِ الْحَجَّاجِ بْنِ حَسَّانَ عَنْ مُقَاتِلِ بْنِ حَيَّانَ رَفَعَهُ قَالَ

قَالَ النَّبِيُّ ﷺ إِنْ جَاءَ رَجُلٌ فَلَمْ يَجِدْ أَحَدًا فَلْيَخْتَلِجْ إِلَيْهِ رَجُلًا مِنَ الصَّفِّ فَلْيَقُمْ مَعَهُ فَمَا أَعْظَمَ أَجْرَ الْمُخْتَلَجِ أَخْبَرَنَاهُ مُحَمَّدُ بْنُ مُحَمَّدٍ أنبأ أَبُو الْحَسَنِ الْفَسَوِيُّ ثنا أَبُو عَلِيٍّ اللُّؤْلُؤِيُّ أَخْبَرَنَا أَبُو دَاوُدَ فَذَكَرَهُ وَقَدْ رُوِيَ مِنْ وَجْهٍ آخَرَ عَنِ النَّبِيِّ ﷺ فِي الْأَمْرِ بِالْإِعَادَةِ