The Messenger of Allah ﷺ said, "There are three from whom prayer is not accepted, nor does it rise to the heavens, nor pass beyond their heads. A man who leads people in prayer while they dislike him, a man who performs the funeral prayer over a deceased without being authorized to do so, and a woman whose husband calls her at night and she refuses him."This narration is mursal, and a similar report is transmitted from Anas as a marfu hadith.
أن رسول الله ﷺ قال: ثلاثة لا تقبل منهم صلاة، ولا تصعد إلى السماء، ولا تجاوز رؤوسهم: رجل أم قوما وهم له كارهون، ورجل صلى على جنازة ولم يؤمر، وامرأة دعاها زوجها من الليل، فأبت عليه. وهذا مرسل، وعن أنس يرفعه مثله.
From the hadith of Anas bin Malik, Ibn Khuzayma related it (1518) from Isa bin Ibrahim, who said, Ibn Wahb related to us, from Ibn Lahia and Saeed bin Abu Ayub, from Ata bin Dinar Hudhali, and he mentioned it.Then he related it (1519) from Isa bin Ibrahim, who said, Ibn Wahb related to us, from Amr bin Harith, from Yazid bin Abu Habib, from Amr bin Walid, from Anas bin Malik, who reported it as a saying of the Prophet, similar to this (that is, similar to the narration of Hudhali).Then Ibn Khuzayma said, "I dictated the first part, and it is mursal, because the hadith of Anas that follows it, which Isa related to us right after it, is a similar version. Had it not been for this, I would not have included the mursal report in this book."I say, the connected hadith of Anas has a hasan chain, for Amr bin Walid was mentioned by Ibn Hibban among the trustworthy narrators, and by Fasawi among the trustworthy people of Egypt, so a narrator of his standing has his hadith graded hasan. That is why Hafiz said of him, "Truthful."As for his statement, "and no one has been appointed," it means by the ruler or by the guardians of the deceased, when the people have no regular imam.