Anas said:
"A Bedouin came to the Masjid and urinated, and the people yelled at him, but the Messenger of Allah (ﷺ) said: 'Leave him alone.' So they left him alone. When he had finished urinating, he ordered that a bucket (be brought) and poured over it."
Arabic/English book reference: Vol. 1, Book 1, Hadith 55