共用方式為


SPUtility.ChangeAccountPassword Method

Changes an account password for the specified SharePoint site.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Shared Sub ChangeAccountPassword ( _
    web As SPWeb, _
    loginName As String, _
    oldPassword As String, _
    newPassword As String _
)
'Usage
Dim web As SPWeb
Dim loginName As String
Dim oldPassword As String
Dim newPassword As StringSPUtility.ChangeAccountPassword(web, _
    loginName, oldPassword, newPassword)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static void ChangeAccountPassword(
    SPWeb web,
    string loginName,
    string oldPassword,
    string newPassword
)

Parameters

  • loginName
    Type: System.String

    A string that contains the user name of the user.

  • oldPassword
    Type: System.String

    A string that contains the old password.

  • newPassword
    Type: System.String

    A string that contains the new password.

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace