public ProfilePropertyDefinition() { this._DataType = Null.NullInteger; this._ModuleDefId = Null.NullInteger; this._PropertyDefinitionId = Null.NullInteger; this._Visibility = UserVisibilityMode.AdminOnly; }
private void Initialize() { int defaultVisible = Null.SetNullInteger(UserModuleBase.GetSetting(PortalId, "Profile_DefaultVisibility")); if (defaultVisible == Null.NullInteger) { _Visibility = UserVisibilityMode.AdminOnly; } else { switch (defaultVisible) { case 0: _Visibility = UserVisibilityMode.AllUsers; break; case 1: _Visibility = UserVisibilityMode.MembersOnly; break; case 2: _Visibility = UserVisibilityMode.AdminOnly; break; } } }
public ProfilePropertyDefinition() { this._DataType = Null.NullInteger; this._ModuleDefId = Null.NullInteger; this._PropertyDefinitionId = Null.NullInteger; this._Visibility = UserVisibilityMode.AdminOnly; }
private bool CheckAccessLevel(UserVisibilityMode VisibilityMode, Entities.Users.UserInfo AccessingUser) { if (String.IsNullOrEmpty(strAdministratorRoleName) && !AccessingUser.IsSuperUser) { PortalInfo ps = new PortalController().GetPortal(objUser.PortalID); strAdministratorRoleName = ps.AdministratorRoleName; } return(VisibilityMode == UserVisibilityMode.AllUsers || (VisibilityMode == UserVisibilityMode.MembersOnly && AccessingUser != null && AccessingUser.UserID != -1) || (AccessingUser.IsSuperUser || objUser.UserID == AccessingUser.UserID || AccessingUser.IsInRole(strAdministratorRoleName))); }
internal static void AddDefaultDefinition(int portalId, string category, string name, string type, int length, int viewOrder, UserVisibilityMode defaultVisibility, Dictionary<string, ListEntryInfo> types) { ListEntryInfo typeInfo = types["DataType:" + type] ?? types["DataType:Unknown"]; var propertyDefinition = new ProfilePropertyDefinition(portalId) { DataType = typeInfo.EntryID, DefaultValue = "", ModuleDefId = Null.NullInteger, PropertyCategory = category, PropertyName = name, Required = false, ViewOrder = viewOrder, Visible = true, Length = length, DefaultVisibility = defaultVisibility }; AddPropertyDefinition(propertyDefinition); }
private void RenderVisibility(HtmlTextWriter writer, string optionValue, UserVisibilityMode selectedVisibility, string optionText) { //Render Li writer.RenderBeginTag(HtmlTextWriterTag.Li); //Render radio button writer.AddAttribute(HtmlTextWriterAttribute.Type, "radio"); writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID); writer.AddAttribute(HtmlTextWriterAttribute.Value, optionValue); if ((Visibility.VisibilityMode == selectedVisibility)) { writer.AddAttribute(HtmlTextWriterAttribute.Checked, "checked"); } writer.RenderBeginTag(HtmlTextWriterTag.Input); writer.Write(optionText); writer.RenderEndTag(); //Close Li writer.RenderEndTag(); }
internal static void AddDefaultDefinition(int portalId, string category, string name, string type, int length, int viewOrder, UserVisibilityMode defaultVisibility, Dictionary <string, ListEntryInfo> types) { ListEntryInfo typeInfo = types["DataType:" + type] ?? types["DataType:Unknown"]; var propertyDefinition = new ProfilePropertyDefinition(portalId) { DataType = typeInfo.EntryID, DefaultValue = "", ModuleDefId = Null.NullInteger, PropertyCategory = category, PropertyName = name, Required = false, ViewOrder = viewOrder, Visible = true, Length = length, DefaultVisibility = defaultVisibility }; AddPropertyDefinition(propertyDefinition); }
private static void AddDefaultDefinition(int portalId, string category, string name, string strType, int length, UserVisibilityMode defaultVisibility, Dictionary <string, ListEntryInfo> types) { _orderCounter += 2; AddDefaultDefinition(portalId, category, name, strType, length, _orderCounter, defaultVisibility, types); }
private void RenderVisibility(HtmlTextWriter writer, string optionValue, UserVisibilityMode selectedVisibility, string optionText) { //Render Li writer.RenderBeginTag(HtmlTextWriterTag.Li); //Render radio button writer.AddAttribute(HtmlTextWriterAttribute.Type, "radio"); writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID); writer.AddAttribute(HtmlTextWriterAttribute.Value, optionValue); if ((Visibility.VisibilityMode == selectedVisibility)) { writer.AddAttribute(HtmlTextWriterAttribute.Checked, "checked"); } writer.RenderBeginTag(HtmlTextWriterTag.Input); writer.Write(optionText); writer.RenderEndTag(); //Close Li writer.RenderEndTag(); }
private static void AddDefaultDefinition(int portalId, string category, string name, string strType, int length, UserVisibilityMode defaultVisibility, Dictionary<string, ListEntryInfo> types) { _orderCounter += 2; AddDefaultDefinition(portalId, category, name, strType, length, _orderCounter, defaultVisibility, types); }
private void Initialize() { int defaultVisible = Null.SetNullInteger(UserModuleBase.GetSetting(PortalId, "Profile_DefaultVisibility")); if (defaultVisible == Null.NullInteger) { _Visibility = UserVisibilityMode.AdminOnly; } else { switch (defaultVisible) { case 0: _Visibility = UserVisibilityMode.AllUsers; break; case 1: _Visibility = UserVisibilityMode.MembersOnly; break; case 2: _Visibility = UserVisibilityMode.AdminOnly; break; } } }
private bool CheckAccessLevel(UserVisibilityMode VisibilityMode, Entities.Users.UserInfo AccessingUser) { if (String.IsNullOrEmpty(strAdministratorRoleName) && !AccessingUser.IsSuperUser) { PortalInfo ps = new PortalController().GetPortal(objUser.PortalID); strAdministratorRoleName = ps.AdministratorRoleName; } return VisibilityMode == UserVisibilityMode.AllUsers || (VisibilityMode == UserVisibilityMode.MembersOnly && AccessingUser != null && AccessingUser.UserID != -1) || (AccessingUser.IsSuperUser || objUser.UserID == AccessingUser.UserID || AccessingUser.IsInRole(strAdministratorRoleName)); }