Property Class

The Property class represents the definition for a user profile property.

System.Object

   Microsoft.SharePoint.Portal.UserProfiles.Property

Public Fields

The following table shows the fields of the Property class and a brief description of each.

Name Description
PROFILEURI_PREFIX Reserved for internal use only
URI_ADGUID Reserved for internal use only
URI_AboutMe Reserved for internal use only
URI_AccountName Reserved for internal use only
URI_Department Reserved for internal use only
URI_FirstName Reserved for internal use only
URI_LastName Reserved for internal use only
URI_Manager Reserved for internal use only
URI_Office Reserved for internal use only
URI_PreferredName Reserved for internal use only
URI_PublicSiteRedirect Reserved for internal use only
URI_SID Reserved for internal use only
URI_Title Reserved for internal use only
URI_UserGuid Reserved for internal use only
URI_WebSite Reserved for internal use only
URI_WorkEmail Reserved for internal use only
URI_WorkPhone Reserved for internal use only

Public Methods

The following table shows the public methods of the Property class and a brief description of each.

Name Description
Commit Commits changes made to a property to the user profile database

Public Properties

The following table shows the properties of the Property class, the data type of each property, and a brief description of each.

Name Data Type Description
DisplayName String Gets or sets the user profile property display name.
DisplayOrder Int32 Gets the order in which user profile properties are displayed.
IsAdminEditable Boolean Gets a value indicating whether the administrator can edit this user profile property.
IsAlias Boolean Gets or sets a value indicating whether this user profile property is related to the user's name and account in portal site operations and search results.
IsImported Boolean Gets a value indicating whether this user profile property is mapped to a Microsoft Active Directory directory service property.
IsPrivate Boolean Gets or sets a value indicating whether this user profile property is private. If a property is private, only the user to whom the user profile belongs will be able to see the property if the property is visible.
IsSection Boolean Gets a value indicating whether this property is a section.
IsSystem Boolean Gets a value indicating whether this user profile property is a system-reserved property.
IsUserEditable Boolean Gets or sets a value indicating whether a user can edit this user profile property.
IsVisibleOnEditor Boolean Gets or sets a value indicating whether this user profile property is visible on the Edit My Profile page.
IsVisibleOnViewer Boolean Gets or sets a value indicating whether this user profile property is displayed in the Details section of the user profile in the public view of each user's personal site.
Length Int32 Gets or sets the maximum data length of the return value of the user profile property according to the data type.
Name String Gets or sets the property name that uniquely identifies this user profile property for this site and in the user profile database.
Type String Gets or sets the friendly name of the type of the user profile property.
URI String Gets the URI of the user profile property.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

There are two types of user profile properties:

  • Regular property. Defines the property data type and the corresponding user profile flags.
  • Section property. Property that serves as a separator for user interface grouping purposes.

Because of the nature of the Section object, the following properties are not applicable: Type, DisplayName, IsUserEditable, IsAdminEditable, Length, IsPrivate, IsAlias, IsVisibleOnViewer. If you try to set a value, an UPUpdateReadOnlyFieldException is thrown.

For regular properties, the Name property can only be set at creation time. No further update is allowed. If there is an attempt to update, an UPUpdateReadOnlyFieldException is thrown. The Name property is used to compose the URI of the property. Therefore the name must be a valid URI schema name, otherwise an UPInvalidValueException is thrown.

Example

The following code example shows the use of the Property class.

Requirements

Namespace: Microsoft.SharePoint.Portal.UserProfiles

Platforms: MicrosoftWindows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security