1 write to _userManager
Identity.ExternalClaims (1)
Pages\Account\Manage\Disable2fa.cshtml.cs (1)
25_userManager = userManager;
9 references to _userManager
Identity.ExternalClaims (9)
Pages\Account\Manage\Disable2fa.cshtml.cs (9)
31var user = await _userManager.GetUserAsync(User); 34throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 37if (!await _userManager.GetTwoFactorEnabledAsync(user)) 39throw new ApplicationException($"Cannot disable 2FA for user with ID '{_userManager.GetUserId(User)}' as it's not currently enabled."); 47var user = await _userManager.GetUserAsync(User); 50throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 53var disable2faResult = await _userManager.SetTwoFactorEnabledAsync(user, false); 56throw new ApplicationException($"Unexpected error occurred disabling 2FA for user with ID '{_userManager.GetUserId(User)}'."); 59_logger.LogInformation("User with ID '{UserId}' has disabled 2fa.", _userManager.GetUserId(User));