Narrated Anas bin Malik (may Allah be pleased with him): People passed by with a funeral, and the Companions (may Allah be pleased with them) praised the deceased. The Prophet (peace and blessings of Allah be upon him) said: "It has become obligatory." Then another funeral passed by, and they spoke ill of the deceased. The Prophet (peace and blessings of Allah be upon him) said: "It has become obligatory." So Umar bin Khattab (may Allah be pleased with him) asked: "What has become obligatory?" The Prophet (peace and blessings of Allah be upon him) said: "Paradise has become obligatory for the one whom you praised, and Hell has become obligatory for the one whom you spoke ill of. You are Allah's witnesses on earth."
Ameer-ul-Mu'mineen Umar bin Khattab (may Allah be pleased with him) says that the Prophet Muhammad (peace and blessings be upon him) said: "If four people testify to the goodness of a Muslim, Allah will admit him to Paradise." We asked, "And if three people testify to his goodness?" He (peace be upon him) said: "And if three people testify to his goodness, (he will also enter Paradise)." Then we asked, "And if two people testify to his goodness?" He (peace be upon him) said: "And if two people (testify to his goodness, he will also enter Paradise)." Then we did not ask the Prophet (peace be upon him) about the testimony of one person.