UserProfileManager.GetStringSinglePropertyValueForUser(SPServiceContext, String, String) UserProfileManager.GetStringSinglePropertyValueForUser(SPServiceContext, String, String) UserProfileManager.GetStringSinglePropertyValueForUser(SPServiceContext, String, String) Method

Definition

Retrieves the single-valued property for the UserProfile whose name matches the propertyName parameter of the UserProfile identified by the accountName parameter.

public:
 static System::String ^ GetStringSinglePropertyValueForUser(Microsoft::SharePoint::SPServiceContext ^ serviceContext, System::String ^ propertyName, System::String ^ accountName);
public static string GetStringSinglePropertyValueForUser (Microsoft.SharePoint.SPServiceContext serviceContext, string propertyName, string accountName);
Public Shared Function GetStringSinglePropertyValueForUser (serviceContext As SPServiceContext, propertyName As String, accountName As String) As String
Parameters
serviceContext
SPServiceContext SPServiceContext SPServiceContext

The set of UserProfile objects to search for the specified account name.

propertyName
String String String

The name of the UserProfile property to retrieve from the current UserProfile.

accountName
String String String

The account name of the requested user profile.

Returns

A string representing a single-valued property.

Exceptions

serviceContext is a null reference (Nothing in Visual Basic).accountName is a null reference (Nothing in Visual Basic).

propertyName is a null reference (Nothing in Visual Basic) or an empty string.accountName is a null reference (Nothing in Visual Basic) or an empty string.

Applies to