Ubaydullah bin Adi bin al-Khiyar (may Allah have mercy on him) says that he went to Sayyiduna Uthman (may Allah be pleased with him) while he was besieged in his house, and Sayyiduna Ali (may Allah be pleased with him) was leading the people in prayer. I said: "O Commander of the Believers, I feel uneasy about praying with these people while you are besieged, and you are the imam. What is your view about praying with them?" Sayyiduna Uthman (may Allah be pleased with him) said: "Prayer is the best thing people do; when they do good, do good along with them, and when they do evil, keep away from their evil."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5856