He has joined a multistate lawsuit against the president over the constitutionality of his executive order.