Merge branch 'v13/dev' into v14/dev
Revert #18249 as it is reimplemented for v15 Revert #18320 as the new architecture explictly throws an error # Conflicts: # build/azure-pipelines.yml # src/Umbraco.Core/EmbeddedResources/Lang/en.xml # src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml # src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs # src/Umbraco.Core/Services/ContentService.cs # src/Umbraco.Core/Services/IContentService.cs # src/Umbraco.Core/Services/MemberService.cs # src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs # src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs # src/Umbraco.Infrastructure/Security/MemberUserStore.cs # src/Umbraco.Web.BackOffice/Controllers/ContentController.cs # src/Umbraco.Web.BackOffice/Controllers/EntityController.cs # src/Umbraco.Web.BackOffice/Controllers/MediaController.cs # src/Umbraco.Web.BackOffice/Controllers/MemberController.cs # src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs # src/Umbraco.Web.BackOffice/Controllers/UsersController.cs # src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.BackOfficeAuth.cs # src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs # src/Umbraco.Web.BackOffice/Filters/MemberSaveModelValidator.cs # src/Umbraco.Web.BackOffice/Filters/MemberSaveValidationAttribute.cs # src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs # src/Umbraco.Web.Common/RuntimeMinification/SmidgeOptionsSetup.cs # src/Umbraco.Web.Common/RuntimeMinification/SmidgeRuntimeMinifier.cs # src/Umbraco.Web.Common/Views/UmbracoViewPage.cs # src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbuttongroup.directive.js # src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js # src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbtabbedcontent.directive.js # src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js # src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js # src/Umbraco.Web.UI.Client/src/common/resources/publicaccess.resource.js # src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js # src/Umbraco.Web.UI.Client/src/common/services/assets.service.js # src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js # src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js # src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediaentryeditor/mediaentryeditor.controller.js # src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html # src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html # src/Umbraco.Web.UI.Client/src/views/content/content.create.controller.js # src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js # src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html # src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js # src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html # src/Umbraco.Web.UI.Client/src/views/webhooks/edit.controller.js # src/Umbraco.Web.UI.Client/src/views/webhooks/edit.html # src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js # src/Umbraco.Web.UI.Client~HEAD # src/Umbraco.Web.UI.Login/src/auth.element.ts # tests/Umbraco.TestData/UmbracoTestDataController.cs # tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs # tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs # tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs # tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs # tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberUserStoreTests.cs # tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/MemberControllerUnitTests.cs # version.json
This commit is contained in:
@@ -128,7 +128,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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user