Fixes problem with UserRepository.GetProfile since it was looking up the wrong fields :( this meant that the security audit events were not being raised since it wasn't finding users by their login

This commit is contained in:
Shannon
2018-11-14 20:32:20 +11:00
parent b029215933
commit 413791fb19

View File

@@ -152,7 +152,7 @@ namespace Umbraco.Core.Persistence.Repositories
public IProfile GetProfile(string username)
{
var sql = GetBaseQuery(false).Where<UserDto>(userDto => userDto.UserName == username, SqlSyntax);
var sql = GetBaseQuery(false).Where<UserDto>(userDto => userDto.Login == username, SqlSyntax);
var dto = Database.Fetch<UserDto>(sql)
.FirstOrDefault();