Developer forum

Forum » CMS - Standard features » Get Custom field values from users

Get Custom field values from users

Adrian Ursu
Reply

Hi Guys,

How should I get the values from User custom fields in a regular page without having to put the Extranet module in a paragraph?

dwtemplatetags=true does not give any clue on how to acces those fields.

Thanks,

Adrian

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

Currently only in Razor:


Modules.UserManagement.User user = Modules.UserManagement.User.Current(Modules.UserManagement.PagePermissionLevels.Frontend);
if ((user != null)) {
    foreach (Modules.Common.CustomFields.CustomFieldValue cfv in user.CustomFieldValues) {
        cfv.CustomField.Name;
        cfv.Value;
    }

 

 
Adrian Ursu
Reply

Thanks a lot Nicolai

 

You must be logged in to post in the forum