He married a woman before the end of her ‘iddah following the death of her husband
Question

                A man married a woman who was still in ‘iddah following the death of her husband, before the ‘iddah ended. This happened thirty years ago without any knowledge of Islam, and now she has children from her second husband. What should she do?.
Praise be to Allah.Firstly: 
What is 
	required of a woman after her husband dies is to observe an ‘iddah of four 
	months and ten days from the date of his death, if she is not pregnant, 
	because Allah, may He be exalted, says (interpretation of the meaning):
“And 
	those of you who die and leave wives behind them, they (the wives) shall 
	wait (as regards their marriage) for four months and ten days”
[al-Baqarah 
	2:234]
If she is 
	pregnant, then her ‘iddah lasts until she gives birth, because Allah may He 
	be exalted, says (interpretation of the meaning):
“And for 
	those who are pregnant (whether they are divorced or their husbands are 
	dead), their Iddah (prescribed period) is until they deliver (their 
	burdens),”
[at-Talaaq 
	65:4]. 
If she gets 
	married during the ‘iddah, then her marriage is invalid according to 
	scholarly consensus, and they must be separated. 
Ibn Qudaamah 
	(may Allah have mercy on him) said: 
It is not 
	permissible for the woman who is in ‘iddah to get married during her ‘iddah, 
	according to scholarly consensus, no matter what kind of ‘iddah it is, 
	because Allah, may He be exalted, says (interpretation of the meaning):
“And you 
	should not settle anything finally about the marriage until the waiting term 
	expires”
[al-Baqarah 
	2:235].
If she does 
	get married, then the marriage is invalid. 
End quote 
	from al-Mughni, 8/100 
It is 
	obligatory to separate her and her second husband, then for her to complete 
	her ‘iddah from scratch. Then when she has completed the ‘iddah for the 
	first marriage, it is permissible for the second husband to make a new 
	marriage contract with her. 
Ibn Qudaamah 
	(may Allah have mercy on him) said:
Once this is 
	established, then he had to leave her and if he does not do that, then they 
	must be separated. If he leaves her or they are separated, then she has to 
	complete the ‘iddah for the first marriage, because that duty takes 
	precedence and that ‘iddah is obligatory because the marriage to the first 
	husband is proven and is valid. Once the ‘iddah for the first marriage is 
	completed, then she has to observe an ‘iddah for the second marriage, and 
	the two ‘iddahs cannot be combined because they are for marriages to two 
	different men. This is the view of ash-Shaafa ‘i. … Then he stated that this 
	opinion was narrated from ‘Umar ibn al-Khattaab and ‘Ali ibn Abi Taalib (may 
	Allah be pleased with them both), then he said: These two opinions are known 
	from two prominent caliphs and it is not known that any of the Sahaabah 
	disagreed with them. Moreover they are rights that belong to two different 
	people, and they cannot be combined.
End quote 
	from al-Mughni, 8/101 
Then after 
	the ‘iddah for the first marriage is complete, the second husband may do a 
	marriage contract with her as soon as the ‘iddah for the first marriage has 
	ended. 
Ibn Qudaamah 
	(may Allah have mercy on him) said: ash-Shaafa ‘i said in al-Jadeed: 
	He may marry her after completion of the ‘iddah following the first marriage 
	and there is no reason why he should not marry her during her ‘iddah from 
	him (the second husband) because the ‘iddah was only prescribed so as to 
	protect lineages, and the lineage belongs to him in this case. This is good 
	and it makes sense.
End quote 
	from al-Mughni, 8/100 
Shaykh Ibn 
	‘Uthaymeen (may Allah have mercy on him) said: 
In 
	principle, the more correct view is that she becomes permissible for him 
	with a marriage contract after the end of the first ‘iddah, especially if he 
	has repented to Allah, may He be exalted, because the ‘iddah is for him 
	(i.e., following the end of a marriage to him).
End quote 
	from ash-Sharh al-Mumti‘, 13/383 
Secondly: 
Even though 
	this marriage is invalid, his children are to be attributed to him because 
	it was like a marriage, and that was due to being unaware of the Islamic 
	ruling. 
Ibn Qudaamah 
	(may Allah have mercy on him) said: 
If a women 
	who is observing ‘iddah gets married and they were aware of the ‘iddah and 
	the prohibition on marrying during this period, and he had intercourse with 
	her, then they are zaanis; the hadd punishment for zina should be carried 
	out on them, she is not entitled to any mahr and any child born should not 
	be attributed to him. But if they were unaware of the ‘iddah or of the 
	prohibition, then the child is to be attributed to him, the hadd punishment 
	is waived and the mahr must be paid.
End quote 
	from al-Mughni, 8/103 
And Allah knows best.