(6) باب تَعْدِيلِ كَمْ يَجُوزُ
Narrated Anas:
A funeral procession passed in front of the Prophet (ﷺ) and the people praised the deceased. The Prophet (ﷺ) said, "It has been affirmed (Paradise)." Then another funeral procession passed by and the people talked badly of the deceased. The Prophet (ﷺ) said, "It has been affirmed (Hell)." Allah's Messenger (ﷺ) was asked, "O Allah's Messenger (ﷺ)! You said it has been affirmed for both?" The Prophet (ﷺ) said, "The testimony of the people (is accepted), (for) the believer are Allah's witnesses on the earth."
Reference: Sahih al-Bukhari 2642
In-book reference: Book 52, Hadith 6
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 48, Hadith 810