How to access the value of a custom field

Added by erick andrade about 10 years ago

I created a custom field named GmailAddress using the Administration menu -> Custom Fields -> Users -> GmailAddress.

Now, how can I access this field using code?

I tried

@var = custom_field_value(39) //39 == field_id

but it returned error.

How can a access the value of this field?

Thank you!