Anybody knows traffic law well? Pull over inquisition.

Let me clear up this whole thread.

NYS does not have a Probable Cause Clause. In NYS it is Reasonable Cause and a police officer can pull you over for any reason he feels is necc and check your identity and driving record. However he can not search your car or arrest you unless you have or gave him a reason to.

In refrence to the OP, the police officer pulling him over irregardless of why or why not, was legal. He has the right to check your friends identity and driving record. Had your friend been legal, he would have been sent on his way. Since your friend was driving illegally, he is now facing the ramifcations.