I wonder why you need a UDF code for this. ANSYS Fluent is providing as well as CFX a thermal phase change model (it is essentially the thermal phase change model from CFX), which allows you to simulate evaporation and condensation of a fluid just with ANSYS Fluent's internal build-in capabilities.
I guess, that you are using a completely outdated version of ANSYS Fluent. I refer to the contemporary Fluent version, which is ANSYS R19.0. If I remember correctly, than the thermal phase change model came into Fluent in release 16.0 or 17.0, but I'm not sure on that.