UserManager<TUser, TKey>.GetTwoFactorEnabledAsync Method

Determines whether two factor authentication is enabled for a user.

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

Syntax

'Declaration
Public Overridable Function GetTwoFactorEnabledAsync ( _
    userId As TKey _
) As Task(Of Boolean)
'Usage
Dim instance As UserManager 
Dim userId As TKey
Dim returnValue As Task(Of Boolean)

returnValue = instance.GetTwoFactorEnabledAsync(userId)
public virtual Task<bool> GetTwoFactorEnabledAsync(
    TKey userId
)
public:
virtual Task<bool>^ GetTwoFactorEnabledAsync(
    TKey userId
)
abstract GetTwoFactorEnabledAsync : 
        userId:'TKey -> Task<bool> 
override GetTwoFactorEnabledAsync : 
        userId:'TKey -> Task<bool> 
public function GetTwoFactorEnabledAsync(
    userId : TKey
) : Task<boolean>

Parameters

  • userId
    Type: TKey
    The user ID.

Return Value

Type: System.Threading.Tasks.Task<Boolean>
The task representing the asynchronous operation.

See Also

Reference

UserManager<TUser, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity