Sayyiduna Anas (may Allah be pleased with him) narrates: I was sitting with the Prophet (peace and blessings be upon him) when a funeral passed by. The Prophet (peace and blessings be upon him) asked: "Whose funeral is this?" Someone said: "This is the funeral of so-and-so, son of so-and-so." He was a man who loved Allah and His Messenger. The Prophet (peace and blessings be upon him) said three times: "It has become due." Then another funeral passed by. He asked: "Whose funeral is this?" The people said: "This is the funeral of so-and-so, son of so-and-so." He was a man who hated Allah and His Messenger, and the Prophet (peace and blessings be upon him) said three times: "It has become due."
(Allamah al-Haythami says:) I say: A hadith from this Companion is transmitted in the Sahih, without this context.
Imam al-Bazzar recorded it, and its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجنائز / 3966