Ibn ‘Abbas told that a woman who had accepted Islam married, and her husband (i.e. the one she had left to marry another when she became a Muslim) went to the Prophet and said, "Messenger of God, I have accepted Islam and she knew that I had done so.” So God’s Messenger took her away from her second husband and restored her to her first. In a version he said, “She accepted Islam along with me,” so he restored her to him.
Abu Dawud transmitted it.