عَنِ ابْنِ عُمَرَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَا تَمْنَعُوا نِسَاءَكُمُ الْمَسَاجِدَ وَبُيُوتُهُنَّ خَيْرٌ لَهُنَّ» . رَوَاهُ أَبُو دَاوُدَ
Translation

Thauban reported God’s Messenger as saying, “There are three things which are unlawful for anyone to do. A man must not act as imam for others in prayer and make a supplication for himself excluding them, for if he does that he has acted treacherously towards them. No one must look inside a house before asking permission to enter, for if he does so he has acted treacherously towards [its inhabitants]. And no one should pray while retaining urine, but should first relieve himself.” Abu Dawud transmitted it, and Tirmidhi has something similar.