The Messenger of Allah (Sallallaahu 'alaihi wasallam) said:
"When you see a man frequenting the mosque, testify that he is a believer because Allah says: `Allah's mosques are visited only by those who believe in Allah and the Last Day.''
[At-Tirmidhi].