Abdulrahman El Bahnasawy, who planned to carry out terrorist attacks on New York City, has been sentenced to forty years in prison.