One study of 52 users that where hand selected out of 1500 that showed no cognitive impairment. http://www.addictionjournal.org/viewpressrelease.asp?pr=147 Others studies both before and after have demonstrated issues. The problem is it's hard to find good data on individuals before they started heavy use, and sleep deprivation and dehydration are linked to long term cognitive impairment.
However, if you look at the existing literature there is no large scale and long term study's demonstrating it's safety. And a lot of evidence that MDMA is dangerous.