Sunan Ibn Majah #617 · The Book of Purification and its Sunnah

Sunan Ibn MajahIt was narrated from Abu Umamah that
Sunan Ibn Majah · Book 1 · The Book of Purification and its Sunnah
Sunan Ibn Majah · كتاب 1 · كتاب الطهارة وسننها
The Messenger of Allah forbade a man to perform prayer when he was suppressing (the urge to urinate or defecate)
حَدَّثَنَا بِشْرُ بْنُ آدَمَ، حَدَّثَنَا زَيْدُ بْنُ الْحُبَابِ، حَدَّثَنَا مُعَاوِيَةُ بْنُ صَالِحٍ، عَنِ السَّفْرِ بْنِ نُسَيْرٍ، عَنْ يَزِيدَ بْنِ شُرَيْحٍ، عَنْ أَبِي أُمَامَةَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ نَهَى أَنْ يُصَلِّيَ الرَّجُلُ وَهُوَ حَاقِنٌ ‏.‏
Reference : Sunan Ibn Majah 617In-book reference : Book 1, Hadith 351