The president plans to direct his administration to compile a list of “sanctuary cities” that do not cooperate with federal enforcement of immigration laws.