 
        
    	
	 
	 
	|
	 
	|
	 
		
			
	
 
    
    
     posted on September 27, 2014 07:10
        using DotNetNuke.Entities.Profile;
string _value = GetUserProfilePropertyValue("MyCustomProfileField").ToString();
        public string GetUserProfilePropertyValue(string propertyName)
        {
            string value = null;
            ProfilePropertyDefinition ppd = UserInfo.Profile.GetProperty(propertyName);
            if (ppd == null)
            {
                value = "";
            }
            else
            {
                value = ppd.PropertyValue;
                if (value == null)
                {
                    if (string.IsNullOrEmpty(ppd.DefaultValue))
                    {
                        value = string.Empty;
                    }
                    else
                    {
                        value = ppd.DefaultValue;
                    }
                }
            }
            return value;
        }
        
        
     
    
    
    
     
    
    
    
 
    
    
    There are currently no comments, be the first to post one!