In recent years, the courts (including the US Supreme Court) have been more permissive regarding searches of persons in vehicles, including passengers and including vehicles not involved in traffic offenses.
Was your friend charged? Sounds like it. Your friend needs to get an attorney ASAP.