UserManager<TUser, TKey>.ChangePasswordAsync Method (TKey, String, String)

 

Changes a user password.

Namespace:   Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

public virtual Task<IdentityResult> ChangePasswordAsync(
    TKey userId,
    string currentPassword,
    string newPassword
)
public:
virtual Task<IdentityResult^>^ ChangePasswordAsync(
    TKey userId,
    String^ currentPassword,
    String^ newPassword
)
abstract ChangePasswordAsync : 
        userId:'TKey *
        currentPassword:string *
        newPassword:string -> Task<IdentityResult>
override ChangePasswordAsync : 
        userId:'TKey *
        currentPassword:string *
        newPassword:string -> Task<IdentityResult>
Public Overridable Function ChangePasswordAsync (
    userId As TKey,
    currentPassword As String,
    newPassword As String
) As Task(Of IdentityResult)

Parameters

  • userId
    Type: TKey

    The user ID.

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>

The task representing the asynchronous operation.

See Also

UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top