Narrated Abu Sa'eed:
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)