(Imām Bukhārī narrates): Abu Al-Walid narrated to us, he said: Za'idah narrated to us, he said: Abu Husain narrated to us, from Abu Abdur Rahman, from Hazrat Ali (may Allāh be pleased with him), he said:
I was a man who experienced madhi frequently. I commanded a man to ask the Prophet ﷺ about it, because of his daughter (I did not ask myself). So he asked, and he said: Perform wudu, and wash your private part.
Reference: Sahih Al Bukhari 269