Those who claim to be Muslim should publicly practise the rituals of Islam and adhere to its laws as much as they can. If a Muslim claims that he is doing acts of worship such as prayer and giving zakaah, he should be believed and what he says should be accepted.
All we know is what people show outwardly, and our Lord has not commanded us to look into people’s hearts, because no one can do that.
The basic principle is that everyone who utters the Shahaadatayn should be regarded as a Muslim, so long as he does not do anything that nullifies his Islam.
It was narrated that Abu Hurayrah (may Allaah be pleased with him) said: When the Prophet (peace and blessings of Allaah be upon him) died and Abu Bakr was appointed as caliph, and some of the Arabs reverted to kufr, ‘Umar said: “O Abu Bakr, how can you fight the people when the Messenger of Allaah (peace and blessings of Allaah be upon him) said: ‘I have been commanded to fight the people until they say Laa ilaaha ill-Allaah (There is no god but Allaah), and whoever says Laa ilaaha ill-Allaah, his wealth and his life are protected from me except in cases dictated by Islamic law, and his reckoning will be with Allaah’?” Abu Bakr said: “By Allaah, I will most certainly fight those who separate prayer and zakaah, for zakaah is what is due on wealth. By Allaah, if they withhold from me a young goat that they used to give to the Messenger of Allaah (peace and blessings of Allaah be upon him), I will fight them for withholding it.” ‘Umar said: “By Allaah, when I saw that Allaah had opened Abu Bakr’s heart to the idea of fighting, I knew that he was right.”
Narrated by al-Bukhaari, 6924; Muslim, 20.
Al-Haafiz ibn Hajar (may Allaah have mercy on him) said:
Al-Khattaabi said: This hadeeth indicates that whoever appears outwardly to be a Muslim, the outward rulings of Islam apply to him, even if he is inwardly a kaafir.
The difference of opinion has to do with one whose corrupt beliefs are discovered and he shows that he has recanted; can that be accepted from him or not? As for the one whose position is unknown, there is no dispute that the outward rulings apply to him. End quote.
Fath al-Baari, 12/279, 280
Since you do not know whether this man holds any corrupt beliefs and he has not done anything that nullifies Islam, no one has the right to accuse him of not being a Muslim. The basic principle is that he is as he appears to be.
Read the following hadeeth and ponder the discussion that took place between the Prophet (peace and blessings of Allaah be upon him) and Khaalid ibn al-Waleed (may Allaah be pleased with him):
It was narrated that Abu Sa’eed al-Khudri (may Allaah be pleased with him) said: A man with sunken eyes, high cheekbones, a prominent forehead, a thick beard, a shaven head and a waist-wrapper that was tucked up, stood up and said: “O Messenger of Allaah, fear Allaah!” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Woe to you! Am I not the most entitled of all the people of earth to fear Allaah?” Then the man turned away. Khaalid ibn al-Waleed said: “O Messenger of Allaah, shall I strike his neck (cut off his head)?” He said, “No, for perhaps he prays.” Khaalid said: “How many are there who pray and say with their tongues what is not in their hearts?” The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “I have not been ordered to search people’s hearts.”
Narrated by al-Bukhaari, 4351; Muslim, 1064
It was narrated that ‘Abd-Allaah ibn ‘Utbah said: I heard ‘Umar ibn al-Khattaab (may Allaah be pleased with him) say: “People used to be judged by the wahy (revelation) at the time of the Messenger of Allaah (peace and blessings of Allaah be upon him), but now the wahy has ceased. Now we will judge you according to what we see of your outward deeds. Whoever appears good to us, we will trust him and draw close to him, and what is in his heart has nothing to do with us. Allaah will call him to account for what is in his heart. And whoever appears bad to us, we will not trust him and we will not believe him, even if he says that inwardly he is good.” Narrated by al-Bukhaari, 2641.
Undoubtedly prayer is the best of a person’s deeds, so if you have seen him praying – even if that is only rarely – then he has shown you that he is Muslim, so he should be trusted and believed. You should honour this man and help him to apply the teachings of Islam and teach him the rulings of sharee’ah, including the importance of prayers and of offering prayer in congregation in the mosque. Show him the good attitude of Islam, and if he is not sincere then perhaps he will be influenced and will become sincere both outwardly and inwardly.
And Allaah knows best.