UserManager<TUser, TKey>.ChangePasswordAsync Method

Changes a user password.

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


Public Overridable Function ChangePasswordAsync ( _
    userId As TKey, _
    currentPassword As String, _
    newPassword As String _
) As Task(Of IdentityResult)
Dim instance As UserManager 
Dim userId As TKey
Dim currentPassword As String 
Dim newPassword As String 
Dim returnValue As Task(Of IdentityResult)

returnValue = instance.ChangePasswordAsync(userId, _
    currentPassword, newPassword)
public virtual Task<IdentityResult> ChangePasswordAsync(
    TKey userId,
    string currentPassword,
    string newPassword
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 function ChangePasswordAsync(
    userId : TKey, 
    currentPassword : String, 
    newPassword : String
) : Task<IdentityResult>


  • 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

Other Resources

ASP.NET Identity