Share via


UserProfile Class

The UserProfile class represents a user profile for a person in the user profile database.

System.Object

   Microsoft.SharePoint.Portal.UserProfiles.UserProfile

Public Methods

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

Name Description
Commit Commits changes made to the user profile to the user profile database
CreatePersonalSite Creates a personal site for this user if a personal site doesn't already exist.
GetEnumerator Gets an enumerator for the properties of a user profile such as property name or property value pairs

Public Properties

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

Name Data Type Description
Alerts Microsoft.SharePoint.Portal.Alerts.AlertCollection Gets the collection of alerts for the current user.
DirectReports System.Data.DataSet Gets the dataset that contains the list of users who report to the current user
ID System.Guid Gets the GUID of the user profile
Item(String) object Gets or sets the specified property value
Manager System.Data.DataTable Gets the data table that contains information about the manager of this user
PersonalSite Microsoft.SharePoint.SPSite Gets the personal site
PersonalUrl String Gets the personal URL
ProfileManager Microsoft.SharePoint.Portal.UserProfiles.UserProfileManager Gets the UserProfileManager object for this user profile.
QuickLinks Microsoft.SharePoint.Portal.UserProfiles.QuickLinkManager Gets the quick links

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.

Example

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

Requirements

Namespace: Microsoft.SharePoint.Portal.UserProfiles

Platforms: MicrosoftWindows Server 2003

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

Security: Code Access Security