If a reason arises which prevents the imam from completing the prayer or from continuing as the imam, he may appoint someone to take over for him and complete the prayer with the congregation. This is the view of the majority of te scholars.
Al-Nawawi (may Allaah have mercy on him) said in al-Majmoo’ (4/142):
Ibn al-Mundhir narrated it from ‘Umar ibn al-Khattaab, ‘Ali, ‘Ilqimah, ‘Ata’, al-Hasan al-Basri, al-Nakha’i, al-Thawri, Maalik, ashaab al-ra’i and Ahmad, and he did not narrate from anyone that it is not permitted to appoint someone else to take over. End quote.
They quoted as evidence the fact that when ‘Umar ibn al-Khattaab (may Allaah be pleased with him) was stabbed as he was praying, he took the hand of ‘Abd al-Rahmaan ibn ‘Awf and made him move forward, and he led the people in the remainder of the prayer. Narrated by al-Bukhaari, 3700.
That was done in the presence of the Sahaabah and others, and no one objected, so there was consensus.
See: al-Mawsoo’ah al-Fiqhiyyah (3/252)
If the imam becomes unable to complete the prayer or to do any of the essential parts of the prayer, that is regarded as one of the excuses which make it permissible for him to appoint someone else to complete the congregational prayer.
Abu’l-Waleed al-Baaji said in al-Muntaqa Sharh al-Muwatta’ (1/290):
With regard to the imam moving back because of an excuse, there is no difference of opinion concerning the fact that this is permissible. The excuses are of two types:
That includes something that makes the imam obliged to become a member of the congregation, which is if he becomes unable to do any of the obligatory parts of the prayer. In that case he should move back and make another man move forward to complete the prayer and he should follow the new imam. End quote.
Another example is if the imam is overcome with weeping and he cannot complete the recitation of al-Faatihah, which is an essential part of the prayer. In that case he should appoint a member of the congregation to take over.
Ibn Qudaamah said in al-Mughni (1/944):
If he is unable to complete al-Faatihah, then he may appoint someone to take over leading them in prayer, because he has become unable to do it. And it is permissible to appoint someone else, such as if he breaks his wudoo’ by accident or if he becomes unable during the prayer to do an essential part of the prayer, then he may appoint someone to complete the prayer. End quote.
But if the imam has finished reciting al-Faatihah, then he is overcome with weeping whilst reciting Qur’aan after al-Faatihah, in that case he may stop reciting and bow, and he does not have to do anything else.
It was narrated that ‘Abd-Allaah ibn al-Saa’ib (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) led us in praying Fajr in Makkah, and he started to recite Soorat al-Mu’minoon, until he came to the passage that mentions Moosa and Haroon, when the Prophet (peace and blessings of Allaah be upon him) was overcome by coughing, so he bowed. Narrated by Muslim (455).
Al-Nawawi (may Allaah have mercy on him) said in Sharh Muslim (4/177):
This hadeeth shows that it is permissible to stop reciting and it is not makrooh to do so, if one stops for a reason. End quote.
It is not permissible for him to appoint someone else to take over in that case, because he is able to complete the prayer with the people, doing only the essential parts of the prayer. There is no need for him to continue reciting with difficulty when weeping, because reciting something else in addition to al-Faatihah is not obligatory.
In Mawaahib al-Jaleel (2/136) it is narrated that al-Maaziri said:
He should not appoint someone to take over if he is prevented from reciting part of the soorah.
In such cases it is recommended that he try to control himself as much as he can, so that he will not cause any hardship to the other worshippers if his weeping goes on for too long, as that will have some negative effects.
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked in Majmoo’ al-Fataawa (11/342): What is your opinion on the phenomenon of weeping loudly?
I have advised many of those who have gotten in touch with me to avoid doing this and that it is not appropriate, because it annoys people and causes hardship to them, and it distracts other worshippers and those who are reading Qur’aan. What the believer should do is strive not to let his voice be heard if he is weeping, and he should beware of showing off, for the shaytaan may lead him to show off. He should not annoy anyone with his voice, or disturb them. But it is known that some people do not do that by choice, rather they get overwhelmed without meaning to. In this case it is forgivable if he cannot help it. It is proven that when the Prophet (peace and blessings of Allaah be upon him) recited Qur’aan, his chest would heave like the boiling of a cauldron because of weeping. And it is narrated that when Abu Bakr (may Allaah be pleased with him) read Qur’aan, he could not make the people hear it because of weeping. And it is narrated that ‘Umar’s sobs could be heard from behind the rows (of worshippers). But this does not mean that the voice should be raised in weeping, rather it is something that overwhelmed them because of their fear of Allaah. So if a person is overcome with weeping and cannot help it, there is no sin on him for that. End quote.
From the above it is clear that if your imam had finished reciting al-Faatihah, then he made a mistake when he appointed someone else to take over, and he should not do that again. But the ruling on your prayer and his is that the prayer is valid, in sha Allaah, and no one should be told to repeat it, because you were all unaware of this ruling.
But if the imam is overcome with weeping whilst reciting al-Faatihah, then what he did by appointing someone else to take over was correct.
And Allaah knows best.