A man praised another man in the presence of the Prophet ﷺ. The Prophet ﷺ said, "Woe to you, you have cut your companion's neck, you have cut your companion's neck," repeating it several times. Then he said, "If one of you must praise his companion, let him say, 'I reckon so-and-so to be such, and Allah is his reckoner, and I do not declare anyone pure before Allah. I reckon him to be this and that,' if indeed he knows that to be the case."In another wording, it is reported from the Prophet ﷺ that a man was mentioned in his presence, and someone said, "Messenger of Allah, after the Messenger of Allah ﷺ there is no man more excellent than him in such and such." The Messenger of Allah ﷺ then responded with something similar to the above.
مدح رجل رجلا، عند النبي ﷺ قال: فقال: ويحك قطعت عنق صاحبك، قطعت عنق صاحبك مرارا إذا كان أحدكم مادحا صاحبه لا محالة، فليقل: أحسب فلانا، والله حسيبه، ولا أزكي على الله أحدا أحسبه، إن كان يعلم ذاك، كذا وكذا. وفي لفظ: عن النبي ﷺ أنه ذكر عنده رجل، فقال رجل: يا رسول الله ما من رجل بعد رسول الله ﷺ أفضل منه في كذا وكذا، فقال رسول الله ﷺ فذكر نحوه.
Bukhari related it in Adab (6162), and Muslim in Zuhd (3000: 65), both through Khalid Haddan, from Abdul-Rahman bin Abu Bakra, from his father, who narrated it. Muslim also related it (3000: 66) through Khalid, with the same chain, and mentioned at its beginning a formula of praise.His statement, "I do not vouch for anyone before Allah," means, I am praising so-and-so according to what has appeared to me of him, but I am not passing final judgment on his ultimate fate, for that is hidden from me. Allah alone governs what lies within hearts, and He is the One who knows what is in the breasts.