Sorry, it was legal.
If he lived off campus it wouldn't be, but the university owns the dorms, and also, he let them in.
P.S. I am not licensed to practice law in whatever state this happened in.