Answer
The law will be the same if you drink alcohol or smoke Marijuana, because both intoxicate and make a person lose his intelligence.
The Salaat of 40 days not being ?accepted? means, he will not receive reward for it, but his obligation will be absolved. (al-Targheeb wat Tarheeb vol.3 pg.260)
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai