A federal judge appointed by President Barack Obama who once blocked North Carolina's voter identification law reversed course Thursday and ruled it constitutional, handing Republicans a major win in their seven-year battle to secure the state's elections.