The Messenger of Allah said: "If you see a man frequenting the mosques, then bear witness to his faith. Allah says: 'The mosques of Allah shall be maintained only by those who believe in Allah and the Last Day. [At-Taubah: 18]'" (Using translation from Ibn Mājah 802)
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ قَالَ إِذَا رَأَيْتُمُ الرَّجُلَ يَعْتَادُ الْمَسْجِدَ فَاشْهَدُوا لَهُ بِالْإِيمَانِ فَإِنَّ اللهَ قَالَ {إِنَّمَا يَعْمُرُ مَسَاجِدَ اللهِ مَنْ آمَنَ بِاللهِ وَالْيَوْمِ الْآخِرِ} [التوبة 18]