Fixed build errors after turning nullability errors off

This commit is contained in:
Nikolaj Geisle
2022-02-10 10:32:45 +01:00
parent b75eae01f3
commit 83baba696c
39 changed files with 91 additions and 69 deletions

View File

@@ -157,7 +157,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
/// <returns>
/// A non cached <see cref="IUser"/> instance
/// </returns>
public IUser Get(int id, bool includeSecurityData)
public IUser Get(int? id, bool includeSecurityData)
{
return GetWith(sql => sql.Where<UserDto>(x => x.Id == id), includeSecurityData);
}
@@ -194,7 +194,7 @@ SELECT 4 AS [Key], COUNT(id) AS [Value] FROM umbracoUser WHERE userDisabled = 0
return result.ToDictionary(x => (UserState)x.Key, x => x.Value);
}
public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true)
public Guid CreateLoginSession(int? userId, string requestingIpAddress, bool cleanStaleSessions = true)
{
var now = DateTime.UtcNow;
var dto = new UserLoginDto