OK, I've been trying to work out what the actual law is that has changed. It's a bit Byzantine: where's Cathy when you need her?
The starting point is the Gun Control Act 1968. That inserts into Section 102. Chapter 44 (Firearms) of title 18, United States Code a new section 922(g)(4) which among other provisions prevents the sale of firearms or ammunition"to any person knowing or having reasonable cause to believe that such person has been adjudicated as a mental defective or has been committed to any mental institution." The definition of those terms does not appear in that Act.
27 CFR 478.11 contains a definition of adjudicated as a mental defective and of committed to a mental institution. A person is “adjudicated as a mental defective” if a court—or other entity having legal authority to make adjudications—has made a determination that an individual, as a result of mental illness: 1) Is a danger to himself or to others; 2) Lacks the mental capacity to contract or manage his own affairs; 3) Is found insane by a court in a criminal case, or incompetent to stand trial, or not guilty by reason of lack of mental responsibility pursuant to the Uniform Code of Military Justice. A person is “committed to a mental institution” if that person has been involuntarily committed to a mental institution by a court or other lawful authority. This expressly excludes voluntary commitment. I found a reference to this definition being changed in 2007 by the NICS Act but couldn't chase down the details of how.
The restriction on sales to persons adjudicated mentally defective or involuntarily committed started to take practical effect with the requirement of background checks in the Brady Act of 1993. Background checks under the Brady Act were given a greater degree of effectiveness by the National Instant Criminal Background Check System (“NICS”) set up in 1998 and amended in 2007. That system is only as good as the information provided to it, and the practical implementation of the passing of information to relevant bodies so that the NICS background checks system can work properly) was still ongoing in January 2017. https://www.federalregister.gov/documents/2016/12/19/2016-30407/implementation-of-the-nics-improvement-amendments-act-of-2007
was the Obama regulation of December 2016 which was aimed at improving the information held in the NICS system on mentally ill people who met the definition of not being able to buy firearms. It was this implementation provision that was repealed by Congress and Trump in February 2017 - http://www.snopes.com/congress-gun-legal-mental/
So, what Trump seems to have done is to stop background checks from identifying certain categories of people who since 1968/2007 should not have been able to buy guns on grounds of their mental illness.
And by God the USA Federal legal code is a convoluted mess and the discussion about it staggeringly ill-informed and/or deliberately misleading.