There was a man during the time of the Prophet ﷺ named Abdullah, who was nicknamed Himar (the donkey), and he used to make the Messenger of Allah ﷺ laugh. The Prophet ﷺ had previously flogged him for drinking. One day he was brought in again, and the Prophet ﷺ ordered him to be flogged.A man from the group said, "O Allah, curse him! How often he is brought in!"The Prophet ﷺ said, "Do not curse him. By Allah, I know nothing of him except that he loves Allah and His Messenger."
أن رجلا كان على عهد النبي ﷺ كان اسمه عبد الله، وكان يلقب حمارا، وكان يضحك رسول الله ﷺ، وكان النبي ﷺ قد جلده في الشراب، فأتي به يوما فأمر فجلد، فقال رجل من القوم: اللهم العنه، ما أكثر ما يؤتى به! فقال النبي ﷺ: لا تلعنوه، فوالله ما علمت إلا أنه يحب الله ورسوله.
Bukhari narrated it in the chapters on legal punishments (6780) from Yahya bin Bukayr, who said, Layth narrated to me, who said, Khalid bin Yazid narrated to me, from Saeed bin Abu Hilal, from Zayd bin Aslam, from his father, from Umar bin Khattab, who mentioned it.