fix remaining test

This commit is contained in:
Shannon
2020-12-04 15:05:47 +11:00
parent 10fc351470
commit 9441f5c5ea
2 changed files with 5 additions and 5 deletions

View File

@@ -201,26 +201,26 @@ namespace Umbraco.Core.Security
IUser user = _userService.GetUserById(UserIdToInt(userId));
if (user == null)
{
return null;
return Task.FromResult((BackOfficeIdentityUser)null);
}
return Task.FromResult(AssignLoginsCallback(_mapper.Map<BackOfficeIdentityUser>(user)));
}
/// <inheritdoc />
public override async Task<BackOfficeIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default)
public override Task<BackOfficeIdentityUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
IUser user = _userService.GetByUsername(userName);
if (user == null)
{
return null;
return Task.FromResult((BackOfficeIdentityUser)null);
}
BackOfficeIdentityUser result = AssignLoginsCallback(_mapper.Map<BackOfficeIdentityUser>(user));
return await Task.FromResult(result);
return Task.FromResult(result);
}
/// <inheritdoc />

View File

@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;