It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "When the imam loses his ablution at the end of his prayer after he has sat up, his prayer is complete, and the prayer of those behind him is likewise regarded as complete, like his prayer."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13727