Ubaydullah bin Adi reported,

He entered upon Uthman bin Affan رضي الله عنه while he was under siege and said, "You are the leader of the community, and what has befallen you is plain to see. An imam of strife is leading us in prayer, and we feel uneasy about it."Uthman replied, "Prayer is the best of what people do. When people do well, do well along with them, and when they do badly, avoid their wrongdoing."Zubaydi said that Zuhri stated, "We do not consider it permissible to pray behind an effeminate man except out of unavoidable necessity."

Bukhari 695

Sahih

قال أبو عبد الله وقال لنا محمد بن يوسف حدثنا الأوزاعي حدثنا الزهري عن حميد بن عبد الرحمن

عن عبيد الله بن عدي بن خيار

أنه دخل على عثمان بن عفان رضي الله عنه وهو محصور فقال إنك إمام عامة ونزل بك ما نرى ويصلي لنا إمام فتنة ونتحرج فقال الصلاة أحسن ما يعمل الناس فإذا أحسن الناس فأحسن معهم وإذا أساءوا فاجتنب إساءتهم وقال الزبيدي قال الزهري لا نرى أن يصلى خلف المخنث إلا من ضرورة لا بد منها

البخاري 695صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
Leadership in prayer by one who is afflicted with tribulation and the innovator
Numbering
Darussalam 695
Bukhari 695