Merge branch 'v14/dev' into v15/dev

# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/FileSystemMainDomLock.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
This commit is contained in:
Sven Geusens
2025-02-18 11:09:52 +01:00
26 changed files with 419 additions and 71 deletions

View File

@@ -101,7 +101,7 @@ public class MemberUserStore : UmbracoUserStore<MemberIdentityUser, UmbracoIdent
UpdateMemberProperties(memberEntity, user, out bool _);
// create the member
Attempt<OperationResult?> saveAttempt = _memberService.Save(memberEntity);
Attempt<OperationResult?> saveAttempt = _memberService.Save(memberEntity, PublishNotificationSaveOptions.Saving);
if (saveAttempt.Success is false)
{
scope.Complete();

View File

@@ -35,18 +35,29 @@ public abstract class UmbracoUserStore<TUser, TRole>
[Obsolete("Use TryConvertIdentityIdToInt instead. Scheduled for removal in V15.")]
protected static int UserIdToInt(string? userId)
{
if (int.TryParse(userId, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result))
if (TryUserIdToInt(userId, out int result))
{
return result;
}
throw new InvalidOperationException($"Unable to convert user ID ({userId})to int using InvariantCulture");
}
protected static bool TryUserIdToInt(string? userId, out int result)
{
if (int.TryParse(userId, NumberStyles.Integer, CultureInfo.InvariantCulture, out result))
{
return true;
}
if (Guid.TryParse(userId, out Guid key))
{
// Reverse the IntExtensions.ToGuid
return BitConverter.ToInt32(key.ToByteArray(), 0);
result = BitConverter.ToInt32(key.ToByteArray(), 0);
return true;
}
throw new InvalidOperationException($"Unable to convert user ID ({userId})to int using InvariantCulture");
return false;
}
protected abstract Task<int> ResolveEntityIdFromIdentityId(string? identityId);