the Prophet said: "It is not allowed for a man to look into the interior of a man's house until he has been given permission, for if he looks, then he has entered. And one who leads people (in Salat) should not supplicate for himself alone with the exclusion of his congregation. If he does, then he has betrayed them. And one is not to stand for Salat while he has to urinate." (Using translation from Tirmidhī 357)
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ قَالَ لَا يَحِلُّ لَامْرِئٍ مِنَ الْمُسْلِمِينَ أَنْ يَنْظُرَ فِي جَوْفِ بَيْتِ امْرِئٍ حَتَّى يَسْتَأْذِنَ فَإِنْ نَظَرَ فَقَدْ دَخَلَ وَلَا يَؤُمَّ قَوْمًا فَيَخْتَصَّ نَفْسَهُ بِدُعَاءٍ دُونَهُمْ فَإِنْ فَعَلَ فَقَدْ خَانَهُمْ وَلَا يُصَلِّي وَهُوَ حَقِنٌ حَتَّى يَتَخَفَّفَ