In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
2- Since he did not do any of these, the marriage he contracted is still valid.
In responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states;
If your friend did commit shirk while he was not aware of it; and yet continued to perform prayers and other religious duties, he did not leave Islam.
If he carefully read the duaas and recitations that are prescribed for prayer, he has already expiated and redeemed himself. He has been asking Allah forgiveness, despite the sin he committed, which he was not aware of at the time.
Committing shirk does not automatically take out a person from the fold of Islam. A person goes out of the fold of Islam by denouncing it or denying the basic tenets of Islam.
Since, as I can understand from your question, he did not do any of these, the marriage he contracted is still valid.
Our scholars made a distinction between committing an act of shirk, which is a grave sin, and setting up partners for Allah. The former does not take out the person from Islam. However, the latter does. They say there is a difference between one form of shirk and another.
In conclusion, your friend’s marriage is valid; and he continues to be a Muslim.
📚 Read Also: Is Marriage Without Legal Papers Valid in the West?
However, having said this, let me reiterate that he needs to turn to Allah in repentance in the manner that the Prophet (peace be upon him) has taught us;
Rabbi ighfir lee dhanbee kullahu diqqahu wa jillahu, awwalahu wa aakhirahu, sirrrahu wa alaaniyyathahu, wa maa alimthu minu wamaa lam a’lam
(My Lord, forgive me all of my sins: the major and the minor, the first and the last, the secret and the public; and that which I am aware of, and that which I am not aware of).
It behooves all of us to read this duaa every day.
Almighty Allah knows best.