Imam Ibrahim al-Nakha'i (may Allah have mercy on him) said: "When a person has professed Islam, then dies, and the funeral prayer has not been offered over him, the funeral prayer is to be offered over him."
Imam Abu Awanah (may Allah have mercy on him) also narrated something similar by way of Mughirah.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الجنائز / 885
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :أثر صحيح الإسناد. » «أورده ابن حجر فى "المطالب العالية"، 885/1، 885/2»
It is narrated from Sayyiduna Anas (may Allah be pleased with him) that a young Jewish boy used to serve the Prophet (peace and blessings be upon him). When he fell ill, he (peace and blessings be upon him) went to visit him and said: "Do you testify that there is no god worthy of worship except Allah and that I am the Messenger of Allah?" The boy looked at his father, and he said: "Say what Muhammad (peace and blessings be upon him) is saying." So he accepted Islam. The Prophet (peace and blessings be upon him) said: "Offer the funeral prayer over your companion."
Imam Abu Ya'la (may Allah have mercy on him) also narrated it by way of Abu Bakr.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الجنائز / 886
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :الحديث صحيح. » «أخرجه صحيح البخاري برقم: 1290، وأخرجه سنن أبي داود برقم: 3095، وأخرجه مسند أحمد برقم: 12381، وأخرجه مصنف ابن أبي شيبة برقم: 4، وأخرجه المستدرك على الصحيحين برقم: 7858، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 3617، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 1907»
Ibn A'idh relates that the Messenger of Allah (peace and blessings be upon him) went to the funeral of a man of the Ansar. When the bier was set down, Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: "O Messenger of Allah, do not offer the funeral prayer over him, for he was a wicked man." The Messenger of Allah (peace and blessings be upon him) turned to the people and said: "Has any of you seen him doing any deed of Islam?" A man said: "Yes, O Messenger of Allah; he kept guard with us for one night in the path of Allah Almighty." So he (peace and blessings be upon him) offered the funeral prayer over him, threw earth upon him, and said: "Your companions think that you are among the people of Hell, while I testify that you are among the people of Paradise." Then he (peace and blessings be upon him) said: "O Umar, you will not be asked about people's deeds; rather, you people will be asked about the prayer."
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الجنائز / 887
Hadith Gradingمحدثین:إسناده ضعيف، مرسل
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده ضعيف؛ فهو مرسل. » «أورده ابن حجر فى "المطالب العالية"، 213، 887»
Abu Atiyyah relates that during the time of the Messenger of Allah (peace and blessings be upon him) a man passed away, and some people said: "O Messenger of Allah, do not offer the funeral prayer over him." Then the narrator mentioned the complete hadith.
Clarification: This refers to the incident mentioned in the previous narration, in which that man's keeping guard in the path of Allah Almighty is mentioned.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الجنائز / 888
Hadith Gradingمحدثین:إسناده ضعيف، مرسل
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده ضعيف؛ فهو مرسل. » «أورده ابن حجر فى "المطالب العالية"، 214، 888»