A recent Government Accountability Office (GAO) report stated that the FAA and DHS databases did not interact as expected when vetting flight training students. The GAO looked at records of 25,599 foreign nationals who applied for U.S. airmen certificates between January 2006 and September 2011.
According to the report, an undisclosed number of those airmen were not vetted by the Transportation Security Administration prior to receiving their certificates, as required by the Department of Homeland Security. Some of that number (the report also did not cite this figure) had never been cleared to begin flight training, much less complete and receive a pilot certificate.
Some flight students who began flight training were also found to have questionable U.S. resident status. Two of these people managed to obtain private pilot certificates, while one was issued a commercial pilot license.
Why the the FAA and the DHS databases did not seem to interact as planned was not made clear in the report.