The World Federation One Stop Fiqh

Ruling 313

If someone cannot control the discharge of urine or faeces, then after recovering from his illness, it is not necessary for him to repeat the prayers he performed in accordance with his religious duty while he was ill. However, if  he recovers from his illness during the time of prayers, then based on obligatory precaution, he must repeat the prayer he performed at that time.