More work on nullable reference types

This commit is contained in:
Nikolaj Geisle
2022-03-31 14:35:23 +02:00
parent 2460c82e02
commit 4571ecb0e3
88 changed files with 388 additions and 340 deletions

View File

@@ -110,7 +110,7 @@ namespace Umbraco.Cms.Web.Common.Security
return result;
}
public override async Task<IdentityResult> ChangePasswordWithResetAsync(string userId, string token, string newPassword)
public override async Task<IdentityResult> ChangePasswordWithResetAsync(string userId, string token, string? newPassword)
{
IdentityResult result = await base.ChangePasswordWithResetAsync(userId, token, newPassword);
if (result.Succeeded)
@@ -121,7 +121,7 @@ namespace Umbraco.Cms.Web.Common.Security
return result;
}
public override async Task<IdentityResult> ChangePasswordAsync(BackOfficeIdentityUser user, string currentPassword, string newPassword)
public override async Task<IdentityResult> ChangePasswordAsync(BackOfficeIdentityUser user, string? currentPassword, string? newPassword)
{
IdentityResult result = await base.ChangePasswordAsync(user, currentPassword, newPassword);
if (result.Succeeded)
@@ -176,7 +176,7 @@ namespace Umbraco.Cms.Web.Common.Security
return currentUserId;
}
public void NotifyAccountLocked(IPrincipal? currentUser, string userId) => Notify(currentUser,
public void NotifyAccountLocked(IPrincipal? currentUser, string? userId) => Notify(currentUser,
(currentUserId, ip) => new UserLockedNotification(ip, userId, currentUserId)
);
@@ -196,7 +196,7 @@ namespace Umbraco.Cms.Web.Common.Security
(currentUserId, ip) => new UserLoginFailedNotification(ip, userId, currentUserId)
);
public void NotifyLoginRequiresVerification(IPrincipal currentUser, string userId) => Notify(currentUser,
public void NotifyLoginRequiresVerification(IPrincipal currentUser, string? userId) => Notify(currentUser,
(currentUserId, ip) => new UserLoginRequiresVerificationNotification(ip, userId, currentUserId)
);