Mishkat al-Masabih 1072
‘Abdallah b. Mas'ud said:
I have seen the time when no one stayed away from prayer except a hypocrite whose hypocrisy was well known, or a sick man, but if a sick man could walk with one on each side of him he would come to prayer. He also said: God’s Messenger taught us the paths of right guidance, among which is prayer in the mosque in which the adhan is called. In a version he said: If anyone would like to meet God tomorrow as a Muslim he should persevere in observing these five times of prayer where the announcement for them is made, for God has laid down for your Prophet the paths of right guidance, among which are the prayers. If you were to pray in your houses as this man who stays away prays in his house, you would abandon the practice of your Prophet, and if you were to abandon the practice of your Prophet you would go astray. No man purifies himself, doing it well, then makes for one of these mosques, without God recording a blessing for him for every step he takes, raising him a degree for it and removing a sin from him for it. I have seen the time when no one stayed away from it except a hypocrite who was well known as such, whereas a man would be brought swaying* between two men till he was set up in the row.” 

* Because he was too weak to walk alone.

Muslim transmitted it.
عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: لَقَدْ رَأَيْتُنَا وَمَا يَتَخَلَّفُ عَنِ الصَّلَاةِ إِلَّا مُنَافِقٌ قَدْ عُلِمَ نِفَاقُهُ أَوْ مَرِيضٌ إِنْ كَانَ الْمَرِيضُ لَيَمْشِي بَيْنَ رَجُلَيْنِ حَتَّى يَأْتِيَ الصَّلَاةَ وَقَالَ إِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَّمَنَا سُنَنَ الْهُدَى وَإِنَّ مِنْ سُنَنِ الْهُدَى الصَّلَاةُ فِي الْمَسْجِدِ الَّذِي يُؤَذَّنُ فِيهِ
وَفِي رِوَايَة: " مَنْ سَرَّهُ أَنْ يَلْقَى اللَّهَ غَدًا مُسْلِمًا فليحافظ على هَؤُلَاءِ الصَّلَوَاتِ الْخَمْسِ حَيْثُ يُنَادَى بِهِنَّ فَإِنَّ اللَّهَ شرع لنبيكم صلى الله عَلَيْهِ وَسلم سُنَنَ الْهُدَى وَإِنَّهُنَّ مِنْ سُنَنِ الْهُدَى وَلَوْ أَنَّكُمْ صَلَّيْتُمْ فِي بُيُوتِكُمْ كَمَا يُصَلِّي هَذَا الْمُتَخَلِّفُ فِي بَيْتِهِ لَتَرَكْتُمْ سُنَّةَ نَبِيِّكُمْ وَلَوْ تَرَكْتُمْ سُنَّةَ نَبِيِّكُمْ لَضَلَلْتُمْ وَمَا مِنْ رَجُلٍ يَتَطَهَّرُ فَيُحْسِنُ الطُّهُورَ ثُمَّ يَعْمِدُ إِلَى مَسْجِدٍ مِنْ هَذِهِ الْمَسَاجِدِ إِلَّا كَتَبَ اللَّهُ لَهُ بِكُلِّ خُطْوَةٍ يَخْطُوهَا حَسَنَةً وَرَفَعَهُ بِهَا دَرَجَةً ويحط عَنْهُ بِهَا سَيِّئَةً وَلَقَدْ رَأَيْتُنَا وَمَا يَتَخَلَّفُ عَنْهَا إِلَّا مُنَافِقٌ مَعْلُومُ النِّفَاقِ وَلَقَدْ كَانَ الرَّجُلُ يُؤْتَى بِهِ يُهَادَى بَيْنَ الرَّجُلَيْنِ حَتَّى يُقَام فِي الصَّفّ. رَوَاهُ مُسلم