that the Messenger of Allah ﷺ said: "If you see a man who comes to the Masjid then bear witness to his faith." Because Allah, the Exalted, says: Only those who believe in Allah, and the Last Day, and establish the Salat, and give the Zakat (should) maintain the Masajid until the end of the Ayah (9:18)
قَالَ رَسُولُ اللَّهِ ﷺ إِذَا رَأَيْتُمُ الرَّجُلَ يَتَعَاهَدُ الْمَسْجِدَ فَاشْهَدُوا لَهُ بِالإِيمَانِ فَإِنَّ اللَّهَ تَعَالَى يَقُولُ (إِنَّمَا يَعْمُرُ مَسَاجِدَ اللَّهِ مَنْ آمَنَ بِاللَّهِ وَالْيَوْمِ الآخِرِ وَأَقَامَ الصَّلاَةَ وَآتَى الزَّكَاةَ ) الآيَةَ