Muhammad bin Amr narrates: Once, Sayyiduna Uthman Ghani (may Allah be pleased with him) led the people in prayer while he was in a state of janabah (major ritual impurity). Later, when he saw a trace of a wet dream on his clothes, he said: "I have grown old. By Allah! I think I was in a state of janabah, but I did not realize it." Then Uthman repeated the prayer, but he did not order the people to repeat that prayer. The narrator named Abdur Rahman states: There is consensus on this matter that the person in a state of janabah will repeat the prayer, but the people will not repeat that prayer. To my knowledge, there is no difference of opinion regarding this.
Hadith Referenceسنن الدارقطني / كتاب الصلاة / 1372