Does an adulterous wife (who committed illegal sexual for about 2 years and told the complete story to husband and repent to Allah, according to her the last child born was from the adulterer) should be forgiven and given a chance of purifying herself by following Islam whole-heartedly? (If yes how to move in the society? Should the husband's mother be told that the newborn baby in not from the family linage or not since she is much fond of the young boy? Similarly should the father of adulterous wife be told about her sin?) Or should be divorced and left out to darkness? Since she repent she is trying to learn Islam and following it seriously like Hijab, Salah, charity.
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The Prophet said: “The child is to be attributed to one on whose bed he is born, and for an adulterer there is stoning.” [Al-Bukhari and Muslim]
The Hadeeth means that if a person has a wife, she automatically becomes for him alone as a lawful sex-partner. Thus, if she gives birth six months following their intimate relations, then the child belongs to him and he is considered his legitimate father. The rulings of a father and child such as inheritance, etc, are effective between them regardless whether or not the child resembles his father. The lineage of this child would be cancelled only if the husband denies his child and performs "Li'aan" (invoking mutual curses). If he does not perform Li'aan, the child is attributed to him since he is the only lawful sex-partner of his wife. This is the opinion of the majority of Muslim scholars, including the Shaafi'i and Hambali Schools of jurisprudence. This is also one of the opinions of Imam Malik which is adopted by the majority of his followers.
Therefore, we inform our inquiring brother that the child belongs to that husband except if he performs Li'aan. The way of Li'aan is that he has to take four oaths that the child is not his and in the fifth oath he invokes the curse of Allah upon himself if the child is his. If he does so, then the child is not traced back to him.
In the situation mentioned in the question, he cannot perform Li'aan since he does not know that it is not his child.
As for the wife, if she has made sincere repentance, then there is no problem to keep her as wife. But, if she is still persisting in sin by committing illegal sexual intercourse, then he should divorce her. Approving a wife who practices Zina is an act of cuckold; a cuckold is threatened with not entering Paradise as mentioned in a Hadeeth.
Allah knows best.
You can search for fatwa through many choices