Sunan Ibn Majah, Book 6, Hadith 60 (Ibn Majah 1492)

It was narrated that Abu Hurairah said:

“A funeral passed by the Prophet (ﷺ) and they praised (the deceased) and spoke well of him and mentioned his good characteristics. He said: ‘(Paradise is) guaranteed for him.’ Then another funeral passed by and they spoke badly of him and mentioned his bad characteristics, and he the Prophet (ﷺ) said: ‘(Hell is) guaranteed for him. You are the witnesses of Allah on earth.’”