Two men have been charged after an off-duty police officer was allegedly attacked by several men in a city nightlife hub.