Yes, by law, the hotel has to identify all people staying in the rooms with a valid document (ID, driver's license or passport).