Al-Adab Al-Mufrad, Book 43, Hadith 1093 (English) ⓘ
Thawban, the mawla of the Messenger of Allah, may Allah bless him and grant him peace, related that the Prophet, may Allah bless him and grant him peace, said, "It is not lawful for a Muslim man to look inside a house until he has been given permission. If he does so, he has entered. He should not act as the imam of a people and then single himself out for supplication to the exclusion of others. He should not pray while he needs to urinate until he has relieved himself."
حَدَّثَنَا إِسْحَاقُ بْنُ الْعَلاَءِ قَالَ: حَدَّثَنِي عَمْرُو بْنُ الْحَارِثِ قَالَ: حَدَّثَنِي عَبْدُ اللهِ بْنُ سَالِمٍ، عَنْ مُحَمَّدِ بْنِ الْوَلِيدِ، قَالَ: حَدَّثَنَا يَزِيدُ بْنُ شُرَيْحٍ، أَنَّ أَبَا حَيٍّ الْمُؤَذِّنَ حَدَّثَهُ، أَنَّ ثَوْبَانَ مَوْلَى رَسُولِ اللهِ صلى الله عليه وسلم حَدَّثَهُ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ: لاَ يَحِلُّ لِامْرِئٍ مُسْلِمٍ أَنْ يَنْظُرَ إِلَى جَوْفِ بَيْتٍ حَتَّى يَسْتَأْذِنَ، فَإِنْ فَعَلَ فَقَدْ دَخَلَ. وَلاَ يَؤُمُّ قَوْمًا فَيَخُصُّ نَفْسَهُ بِدَعْوَةٍ دُونَهُمْ حَتَّى يَنْصَرِفَ. وَلاَ يُصَلِّي وَهُوَ حَاقِنٌ حَتَّى يَتَخَفَّفَ.
also referenced under: Hadith 1093 (Reference) & Book 43, Hadith 43 (In-Book)