(CNN) Speaking on the two mass shootings this weekend, President Donald Trump said Monday that mental illness and hate played a role in these attacks. Critics were quick to point out that Trump signed a bill at the beginning of his presidency reversing a regulation under President Barack Obama that banned certain people with mental impairments from buying firearms.

Is this criticism merited?

Facts First: It's complicated. The Obama administration's rule, which took effect two days before Trump's inauguration, restricted people who required help managing government benefits and had a mental impairment from buying guns. That includes those with eating disorders, cognitive impairments and depression. Multiple disability groups, along with the American Civil Liberties Union opposed the regulation.

Under the regulation , the Social Security Administration was required to submit anyone to the federal background check database if they received assistance managing their benefits from a representative payee -- meaning the person has been formally determined unable to manage their own benefit payments alone -- and also had a mental impairment that limits their ability to work. The list of impairments included depression, anxiety, neurocognitive disorders, eating disorders and more.

JUST WATCHED Psychiatrist: This is an excuse for not taking action Replay More Videos ... MUST WATCH Psychiatrist: This is an excuse for not taking action 01:32

When the Obama regulation went into effect, the White House announced it expected 75,000 people to be affected.

Read More