عَنْ أَنَسٍ قَالَ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْخَلَاءَ نَزَعَ خَاتَمَهُ. رَوَاهُ أَبُو دَاوُدَ وَالنَّسَائِيُّ وَالتِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ غَرِيبٌ
وَقَالَ أَبُو دَاوُدَ: هَذَا حَدِيثٌ مُنْكَرٌ. وَفِي رِوَايَتِهِ وَضَعَ بَدَلَ نزع
Translation
‘Umar said
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.