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.
This person is not sinful [and is not required to do anything]. He has to ignore these whispers, repel them, and not pay any attention to them, as being carried away with them leads to a great evil.
Praise be to Allah; his Islam is sound. So, let him be certain of this, and let him be certain that there is no sin on him at all for what happened, praise be to Allah.
He should have trust in the Mercy of Allah, the Most High, and let him think good of Him, as Allah is as His servant expects Him to be.
Allah Knows best.