All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
Prayer is of no avail to a person who blasphemes Allaah the Almighty or one of His Names or Attributes, because this person is considered a disbeliever whose deeds are fruitless and unacceptable. Allaah the Almighty Says (what means):
This person must first repent from the disbelief caused by blaspheming Allaah the Almighty and then perform his other obligations, the most important of which is prayer.
Allaah Knows best.