The Prophet saw me standing and passing water and said, "‘Umar, do not pass water standing." So I never did it again.
Tirmidhi and Ibn Majah transmitted it. The shaikh and imam Muhyi as-Sunna has given a sound tradition from Hudhaifa who said that the Prophet came to a midden and passed water standing. (Bukhari and Muslim.) It is said that that had a valid reason.
Abu Huraira said, "When the Prophet went to the privy I brought him water in a small vessel or a skin and he cleaned himself, after which he wiped his hand on the ground. I then brought him another vessel and he performed ablution.”
Abu Dawud transmitted it, and Darimi and Nasa’i transmitted something similar.