Sahih al-Bukhari, Hadith 2642 ⓘ
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."
حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَالَ مُرَّ عَلَى النَّبِيِّ صلى الله عليه وسلم بِجَنَازَةٍ، فَأَثْنَوْا عَلَيْهَا خَيْرًا فَقَالَ " وَجَبَتْ ". ثُمَّ مُرَّ بِأُخْرَى فَأَثْنَوْا عَلَيْهَا شَرًّا ـ أَوْ قَالَ غَيْرَ ذَلِكَ ـ فَقَالَ " وَجَبَتْ ". فَقِيلَ يَا رَسُولَ اللَّهِ، قُلْتَ لِهَذَا وَجَبَتْ، وَلِهَذَا وَجَبَتْ، قَالَ " شَهَادَةُ الْقَوْمِ، الْمُؤْمِنُونَ شُهَدَاءُ اللَّهِ فِي الأَرْضِ ".
also referenced under: Book 52, Hadith 6 (In-Book) & Volume 3, Book 48, Hadith 810 (USC-MSA)