private void PopulateRequiredProfileControls() { foreach (CProfilePropertyDefinition propertyDefinition in requiredProfileProperties) { CProfilePropertyDefinition.SetupPropertyControl( this, pnlRequiredProfileProperties, propertyDefinition, timeOffset, SiteRoot); } }
private void PopulateProfileControls() { if (siteUser == null) { return; } if (!isAdmin) { return; } CProfileConfiguration profileConfig = CProfileConfiguration.GetConfig(); if (profileConfig != null) { foreach (CProfilePropertyDefinition propertyDefinition in profileConfig.PropertyDefinitions) { if ( (propertyDefinition.OnlyAvailableForRoles.Length == 0) || (siteUser.IsInRoles(propertyDefinition.OnlyAvailableForRoles)) ) { object propValue = siteUser.GetProperty(propertyDefinition.Name, propertyDefinition.SerializeAs, propertyDefinition.LazyLoad); if (propValue != null) { CProfilePropertyDefinition.SetupPropertyControl( this, pnlProfileProperties, propertyDefinition, propValue.ToString(), TimeOffset, SiteRoot); } else { CProfilePropertyDefinition.SetupPropertyControl( this, pnlProfileProperties, propertyDefinition, propertyDefinition.DefaultValue, TimeOffset, SiteRoot); } } } } }
private void PopulateRequiredProfileControls() { if (pnlProfile != null) { CProfileConfiguration profileConfig = CProfileConfiguration.GetConfig(); if (profileConfig != null) { foreach (CProfilePropertyDefinition propertyDefinition in profileConfig.PropertyDefinitions) { if (propertyDefinition.RequiredForRegistration) { CProfilePropertyDefinition.SetupPropertyControl( this, pnlProfile, propertyDefinition, timeOffset, SiteRoot); } } } } }