Yahya related to me from Malik from Hisham ibn Urwa from his father that Abdullah ibn al-Arqam used to lead his companions in prayer. The time for prayer came one day and he went to relieve himself. When he returned, he said, "I heard the Messenger of Allah ﷺ say, 'If you wish to defecate, you should do so before the prayer.' "
أَنَّ عَبْدَ اللَّهِ بْنَ الأَرْقَمِ كَانَ يَؤُمُّ أَصْحَابَهُ فَحَضَرَتِ الصَّلاَةُ يَوْمًا فَذَهَبَ لِحَاجَتِهِ ثُمَّ رَجَعَ فَقَالَ إِنِّي سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ إِذَا أَرَادَ أَحَدُكُمُ الْغَائِطَ فَلْيَبْدَأْ بِهِ قَبْلَ الصَّلاَةِ