Jabir (may Allah have mercy on him) said: Umar bin Abd al-Aziz (may Allah have mercy on him) wrote to Abd al-Hamid bin Zayd: Do not pass judgement on the basis of neighbourhood. And he wrote to him: Do not judge in the mosque, for Jews, Christians and menstruating women will come to you.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20269