共用方式為


UserProfileManager.AddLeader Method

Adds a new leader to the user profile database.

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

Syntax

'Declaration
Public Sub AddLeader ( _
    accountName As String _
)
'Usage
Dim instance As UserProfileManager
Dim accountName As String

instance.AddLeader(accountName)
public void AddLeader(
    string accountName
)

Parameters

  • accountName
    Type: System.String

    The account name of the leader to add.

Exceptions

Exception Condition
ArgumentException

accountName is null or empty.

DuplicateEntryException

The user specified by the accountName parameter is already a leader.

UserNotFoundException

The user specified by the accountName parameter does not exist in the user profile database.

AccountNotValidatedException

The user specified by the accountName parameter has a manager.

Remarks

This method adds the leader specified by the accountName parameter to the user profile database.

See Also

Reference

UserProfileManager Class

UserProfileManager Members

Microsoft.Office.Server.UserProfiles Namespace

Leader