Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates: A Bedouin came to the Prophet (peace and blessings be upon him) and accepted Islam at his hand in the mosque. Then he turned away, stood, spread his legs and began to urinate. The people moved towards him, so the Prophet (peace and blessings be upon him) said: "Do not interrupt this man while he is urinating." Then he called the man and said: "Are you not a Muslim?" He said: "Yes indeed!" The Prophet (peace and blessings be upon him) said: "Then why did you urinate in the mosque?" The man said: "By the One who sent you with the truth, I thought that this too was just open ground, so I urinated on it." The Prophet (peace and blessings be upon him) gave the order, and a bucket of water was brought and poured over his urine.
Abu Ya'la, al-Bazzar and al-Tabarani in al-Mu'jam al-Kabir recorded it, and its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1958
Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: A Bedouin came and urinated in the mosque. The Prophet (peace and blessings be upon him) gave an order concerning that spot; it was dug up and then a bucket of water was poured over it. Then the narrator mentioned the rest of the hadith.
Abu Ya'la recorded it; its chain contains Sam'an bin Malik, and he is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1959