As president, he signed two executive orders temporarily banning refugees and citizens of several Muslim-majority nations from entering the United States, but both orders were quickly challenged on legal grounds.