"A funeral passed by and the deceased was praised." The Prophet said: "It is granted." Another funeral passed by and the deceased was criticized. The Prophet said: "It is granted." 'Umar said: "May my father and mother be ransomed for you. One funeral passed by and the deceased was praised, and you said, 'It is granted?"' He said: "Whoever is praised will be granted Paradise, and whoever is criticized will be granted Hell, You are the witnesses of Allah on Earth."
Sunan an-Nasa'i Book 21, Hadith 115