Fixed issue in https://github.com/umbraco/Umbraco-CMS/issues/12384 (#12420)
We need to use invariant culture when doing ToString of user ints
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
@@ -68,7 +69,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<UserTwoFactorProviderModel>>> Get2FAProvidersForUser(int userId)
|
||||
{
|
||||
var user = await _backOfficeUserManager.FindByIdAsync(userId.ToString());
|
||||
var user = await _backOfficeUserManager.FindByIdAsync(userId.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
var enabledProviderNameHashSet = new HashSet<string>(await _twoFactorLoginService.GetEnabledTwoFactorProviderNamesAsync(user.Key));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user