UserProfileManager.GetUserProfile method (Boolean)

Gets the UserProfile object of the current user or creates one if the UserProfile object does not already exist.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
Public Function GetUserProfile ( _
    bCreateIfNotExist As Boolean _
) As UserProfile
'Usage
Dim instance As UserProfileManager
Dim bCreateIfNotExist As Boolean
Dim returnValue As UserProfile

returnValue = instance.GetUserProfile(bCreateIfNotExist)
public UserProfile GetUserProfile(
    bool bCreateIfNotExist
)

Parameters

  • bCreateIfNotExist
    Type: System.Boolean

    true if a user profile is created because it does not already exist in the user profile database; otherwise, false.

Return value

Type: Microsoft.Office.Server.UserProfiles.UserProfile
that represents the user profile of the current user.

See also

Reference

UserProfileManager class

UserProfileManager members

GetUserProfile overload

Microsoft.Office.Server.UserProfiles namespace