public static UserInfo UpdateUserProfile(UserInfo objUser, ProfilePropertyDefinitionCollection profileProperties) { bool updateUser = Null.NullBoolean; if (profileProperties != null) { foreach (ProfilePropertyDefinition propertyDefinition in profileProperties) { string propertyName = propertyDefinition.PropertyName; string propertyValue = propertyDefinition.PropertyValue; if (propertyDefinition.IsDirty) { objUser.Profile.SetProfileProperty(propertyName, propertyValue); if (propertyName.ToLower() == "firstname" || propertyName.ToLower() == "lastname") { updateUser = true; } } } UpdateUserProfile(objUser); if (updateUser) { UserController.UpdateUser(objUser.PortalID, objUser); } } return(objUser); }
public void AddRange(ProfilePropertyDefinitionCollection collection) { foreach (ProfilePropertyDefinition objProfilePropertyDefinition in collection) { Add(objProfilePropertyDefinition); } }
public void AddRange(ProfilePropertyDefinitionCollection collection) { foreach (ProfilePropertyDefinition objProfilePropertyDefinition in collection) { Add(objProfilePropertyDefinition); } }
public ProfilePropertyDefinitionCollection GetByCategory(string category) { ProfilePropertyDefinitionCollection collection = new ProfilePropertyDefinitionCollection(); foreach (ProfilePropertyDefinition profileProperty in InnerList) { if (profileProperty.PropertyCategory == category) { collection.Add(profileProperty); } } return collection; }
public static ProfilePropertyDefinitionCollection GetPropertyDefinitionsByCategory(int portalId, string category) { ProfilePropertyDefinitionCollection definitions = new ProfilePropertyDefinitionCollection(); foreach (ProfilePropertyDefinition definition in GetPropertyDefinitions(portalId)) { if (definition.PropertyCategory == category) { definitions.Add(definition); } } return(definitions); }
public ProfilePropertyDefinitionCollection GetByCategory(string category) { ProfilePropertyDefinitionCollection collection = new ProfilePropertyDefinitionCollection(); foreach (ProfilePropertyDefinition profileProperty in InnerList) { if (profileProperty.PropertyCategory == category) { collection.Add(profileProperty); } } return(collection); }
private static ProfilePropertyDefinitionCollection FillCollection(IDataReader dr) { ArrayList arrDefinitions = CBO.FillCollection(dr, typeof(ProfilePropertyDefinition)); ProfilePropertyDefinitionCollection definitionsCollection = new ProfilePropertyDefinitionCollection(); foreach (ProfilePropertyDefinition definition in arrDefinitions) { definition.ClearIsDirty(); object setting = UserModuleBase.GetSetting(definition.PortalId, "Profile_DefaultVisibility"); if (setting != null) { definition.Visibility = (UserVisibilityMode)setting; } definitionsCollection.Add(definition); } return(definitionsCollection); }
public static ProfilePropertyDefinitionCollection GetPropertyDefinitionsByPortal(int portalId, bool clone) { ProfilePropertyDefinitionCollection definitions = new ProfilePropertyDefinitionCollection(); foreach (ProfilePropertyDefinition definition in GetPropertyDefinitions(portalId)) { if (clone) { definitions.Add(definition.Clone()); } else { definitions.Add(definition); } } return(definitions); }
public void InitialiseProfile(int portalId, bool useDefaults) { _profileProperties = ProfileController.GetPropertyDefinitionsByPortal(portalId, true); if (useDefaults) { foreach (ProfilePropertyDefinition ProfileProperty in _profileProperties) { ProfileProperty.PropertyValue = ProfileProperty.DefaultValue; } } }
public ProfilePropertyDefinitionCollection(ProfilePropertyDefinitionCollection collection) { AddRange(collection); }
public ProfilePropertyDefinitionCollection(ProfilePropertyDefinitionCollection collection) { AddRange(collection); }