Sahih Bukhari Volume 3, Book 48, Hadith Number 810.
Narated By 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 Apostle was asked, “O Allah’s Apostle! 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.”