Trump is 100% correct on the travel ban. Even @Sidney agrees that people travelling to war zones and allowed back is a factor in these attacks. If countries like Syria, Iraq, Yemen, etc. have no ability to control who enters or leaves their countries, why does it not make sense for western countries to try and control the flow?
The argument against the travel ban is that it is religious discrimination, which is mindbogglingly stupid. If it were a Muslim ban, why are countries with massive Muslim populations like Indonesia, India and Pakistan not affected?