Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:219Mūsá b. Ismāʿīl > Hammām > Isḥāq > Anas b. Mālik

The Prophet ﷺ saw a Bedouin making water in the mosque and told the people not to disturb him. When he finished, the Prophet ﷺ asked for some water and poured it over (the urine).  

البخاري:٢١٩حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ قَالَ حَدَّثَنَا هَمَّامٌ أَخْبَرَنَا إِسْحَاقُ عَنْ أَنَسِ بْنِ مَالِكٍ

أَنَّ النَّبِيَّ ﷺ رَأَى أَعْرَابِيًّا يَبُولُ فِي الْمَسْجِدِ فَقَالَ دَعُوهُ حَتَّى إِذَا فَرَغَ دَعَا بِمَاءٍ فَصَبَّهُ عَلَيْهِ  


See similar narrations below:

Collected by Muslim
muslim:284aQutaybah b. Saʿīd > Ḥammād / Ibn Zayd > Thābit > Anas

A Bedouin urinated in the mosque. Some of the persons stood up (to reprimand him or to check him from doing so), but the Messenger of Allah ﷺ said: Leave him alone; don't interrupt him. He (the narrator) said: And when he had finished, he called for a bucket of water and poured it over.  

مسلم:٢٨٤aوَحَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ حَدَّثَنَا حَمَّادٌ وَهُوَ ابْنُ زَيْدٍ عَنْ ثَابِتٍ عَنْ أَنَسٍ

أَنَّ أَعْرَابِيًّا بَالَ فِي الْمَسْجِدِ فَقَامَ إِلَيْهِ بَعْضُ الْقَوْمِ فَقَالَ رَسُولُ اللَّهِ ﷺ دَعُوهُ وَلاَ تُزْرِمُوهُ قَالَ فَلَمَّا فَرَغَ دَعَا بِدَلْوٍ مِنْ مَاءٍ فَصَبَّهُ عَلَيْهِ