Sayyiduna Abu Bakr al-Siddiq (may Allah be pleased with him) narrates: A man from among the polytheists came, turned towards the Prophet (peace and blessings be upon him), exposed his private parts and began to urinate. I said: "O Messenger of Allah, is this man not seeing us?" The Prophet (peace and blessings be upon him) said: "Had this man been seeing us, he would not have turned towards us with his private parts exposed." The narrator says: That is, this happened at the time when the Prophet (peace and blessings be upon him) was in the cave.
Abu Ya'la recorded it; its chain contains a narrator, Musa bin Mutayr, who is matruk (abandoned).