Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the two factor authentication enabled property for the user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
'Declaration
Public Overridable Function SetTwoFactorEnabledAsync ( _
userId As TKey, _
enabled As Boolean _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager
Dim userId As TKey
Dim enabled As Boolean
Dim returnValue As Task(Of IdentityResult)
returnValue = instance.SetTwoFactorEnabledAsync(userId, _
enabled)
public virtual Task<IdentityResult> SetTwoFactorEnabledAsync(
TKey userId,
bool enabled
)
public:
virtual Task<IdentityResult^>^ SetTwoFactorEnabledAsync(
TKey userId,
bool enabled
)
abstract SetTwoFactorEnabledAsync :
userId:'TKey *
enabled:bool -> Task<IdentityResult>
override SetTwoFactorEnabledAsync :
userId:'TKey *
enabled:bool -> Task<IdentityResult>
public function SetTwoFactorEnabledAsync(
userId : TKey,
enabled : boolean
) : Task<IdentityResult>
- userId
Type: TKey
The user ID.
- enabled
Type: System.Boolean
true to set two factor authentication; otherwise, false.
Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
UserManager<TUser, TKey> Class