that the Messenger of Allah ﷺ said: "When you see a man frequenting the Masjid, then testify to his faith. Indeed Allah, Most High, said: The Masjid shall be maintained by those who believe in Allah and the Last day (9:18)." (Another chain) from Abu Sa'eed from the Prophet ﷺ with similar wording except that he said: "Yata'ahadul Masjid."
رَسُولُ اللَّهِ ﷺ إِذَا رَأَيْتُمُ الرَّجُلَ يَعْتَادُ الْمَسْجِدَ فَاشْهَدُوا لَهُ بِالإِيمَانِ قَالَ اللَّهُ تَعَالَى ( إِنَّمَا يَعْمُرُ مَسَاجِدَ اللَّهِ مَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الآخِرِ ) حَدَّثَنَا ابْنُ أَبِي عُمَرَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ عَنْ عَمْرِو بْنِ الْحَارِثِ عَنْ دَرَّاجٍ عَنْ أَبِي الْهَيْثَمِ عَنْ أَبِي سَعِيدٍ عَنِ النَّبِيِّ ﷺ نَحْوَهُ إِلاَّ أَنَّهُ قَالَ يَتَعَاهَدُ الْمَسْجِدَ