Is your girlfriend renting the entire apartment along with her roommates, on a single lease, or are they each separately leasing space in the apartment? Do they each have their own rooms, or are bedrooms shared?
Actually, assuming that a lease provision is unlawful, should the matter be challenged in court a landlord won't be able to successfully evict a tenant for 'violating' the unlawful provision.

