On people praising the dead person

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

163. Chapter: On people praising the dead person

950. Anas said, "A funeral procession passed by and they were praising the dead man. The Prophet, may Allah bless him and grant him peace, said, 'It is mandatory.' Then another passed and they were speaking ill of the dead man. He said, 'It is mandatory.' 'Umar ibn al-Khattab said, 'What is mandatory?' He said, 'You praised this one, and so the Garden is mandatory for him and you spoke evil of this one, so the Fire is mandatory for him. You are the witnesses of Allah on the earth.'" [Agreed upon]

951. Abu'l-Aswad said, "I came to Madina and was sitting with 'Umar ibn al-Khattab when a funeral passed by and the dead man was praised. 'Umar said, 'It is mandatory.' Then another passed by and they praised the dead. 'Umar said, 'It is mandatory.' Then a third passed by and they spoke ill of the dead. 'Umar said, 'It is mandatory.'" Abu'l-Aswad said, "I said, 'What is mandatory, Amir al-Mu'minin?' He said, 'I say as the Prophet, may Allah bless him and grant him peace, said, "Any Muslim to whose goodness four people testify, will be admitted by Allah to the Garden." We said, "And if three do?" He said, "Three as well." We said, "And two." He said, "Two also." Then we did not ask him about one.'" [al-Bukhari]