Only if you are passing through. He wasn't passing through, he was visiting his girlfriend in Johnston, RI.
FOPA only comes into play if you follow all of its restrictions and you transport in accordance with those restrictions. That is, you must be legal to possess the gun in your state of origin AND in your destination. In this case, his state of origin was MA, where he was legal. His destination was RI. Was he legal to even possess the gun in RI? I don't know that part of RI law. If not, then he was toast.
Furthermore, FOPA requires you to transport unloaded and in a trunk or locked container. His gun was loaded and accessible. Therefore, he was not transporting in accordance with FOPA so he has no protection under it.
Dude. There are three ways they can search your car. 1) They have a search warrant. 2) They have probable cause. 3) You give them consent. You gave them consent. Did they have probable cause? Unlikely. And not consenting to a search does not constitute probable cause.
Are you out of your mind? Seriously? Do you have any conception of the bullet that you just dodged? You broke RI law and could have been arrested.
Goodness, gracious.
PS: Nothing good happens after midnight. Get home before then and stay there.