Thawban reported,

The Messenger of Allah ﷺ said, "No Muslim should stand for prayer while needing to relieve himself until he has eased himself."

Ibn Majah 619

Hasan

حدثنا محمد بن المصفى الحمصي حدثنا بقية عن حبيب بن صالح عن يزيد بن شريح عن أبي حي المؤذن

عن ثوبان

عن رسول الله ﷺ أنه قال لا يقوم أحد من المسلمين وهو حاقن حتى يتخفف

ابن ماجه 619حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Purification and its sunnahs
Chapter
Prohibition for one needing to relieve himself to pray
Numbering
Darussalam 619
Ibn Majah 619