UserManagerExtensions.VerifyChangePhoneNumberToken<TUser, TKey> Method

Determines whether the token is valid for changing the user's phone number.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function VerifyChangePhoneNumberToken(Of TUser As {Class, Object, IUser(Of TKey)}, TKey As {Object, IEquatable(Of TKey)}) ( _
    manager As UserManager(Of TUser, TKey), _
    userId As TKey, _
    token As String, _
    phoneNumber As String _
) As Boolean
'Usage
Dim manager As UserManager(Of TUser, TKey)
Dim userId As TKey
Dim token As String 
Dim phoneNumber As String 
Dim returnValue As Boolean 

returnValue = manager.VerifyChangePhoneNumberToken(userId, _
    token, phoneNumber)
public static bool VerifyChangePhoneNumberToken<TUser, TKey>(
    this UserManager<TUser, TKey> manager,
    TKey userId,
    string token,
    string phoneNumber
)
where TUser : class, Object, IUser<TKey>
where TKey : Object, IEquatable<TKey>
[ExtensionAttribute]
public:
generic<typename TUser, typename TKey>
where TUser : ref class, Object, IUser<TKey>
where TKey : Object, IEquatable<TKey>
static bool VerifyChangePhoneNumberToken(
    UserManager<TUser, TKey>^ manager, 
    TKey userId, 
    String^ token, 
    String^ phoneNumber
)
static member VerifyChangePhoneNumberToken : 
        manager:UserManager<'TUser, 'TKey> * 
        userId:'TKey * 
        token:string * 
        phoneNumber:string -> bool   when 'TUser : not struct and Object and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>
JScript does not support generic types and methods.

Type Parameters

  • TUser
    The type of the user.
  • TKey
    The type of the key.

Parameters

  • userId
    Type: TKey
    The user ID.

Return Value

Type: System.Boolean
true if the token is valid for changing the user’s phone number; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UserManager<TUser, TKey>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).

See Also

Reference

UserManagerExtensions Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity