Abdullah ibn Mas’ud (may Allah be pleased with him) said:
“When you see any of your (brothers) fallen into a sin, do not curse him in supplication against him, and do not revile him; rather, pray to Allah that He grant him well-being.”
(At-Tawbah by Ibn Abi ad-Dunya: p. 99)
When someone cursed a companion who used to drink alcohol, the Prophet ﷺ said: “Do not curse him. By Allah! I know that he loves Allah and His Messenger.”
(Sahih al-Bukhari: 6780)
And he said: “Do not help Satan against your brother.”
(Sahih al-Bukhari: 6781)
It is narrated from Abdullah ibn Mas’ud (may Allah be pleased with him) that the Prophet ﷺ said:
“The believer is not a taunter, nor one who curses.”
(Sunan at-Tirmidhi: 1977)
One should hate the sin, not the sinner. A believer does not desire the disgrace of his brother; rather, he seeks his guidance, because cursing and taunting harden hearts, while supplication opens the doors of reform.