I think it is a stupid law though. Imagine if we applied that logic to other constitutionally protected rights. "Anyone who is an unlawful user of or addicted to any controlled substance shall not have the right to vote" or "Anyone who is an unlawful user of or addicted to any controlled substance shall not have the right to due process".
I'm not so sure about that.
Not the same thing at all, because a firearm is directly and irrevocably more dangerous while under the influence of drugs.
You can debate the tradeoff of "right to bear arms" vs "right to regulate arms" (just as voting has gone through lots of regulations, some terrible (black people, women), some OK or debatable (showing proof residence or citizenship somewhere in the process), but it's not obvious simply by analogy to other rights.