diff --git a/src/Umbraco.Core/Security/BackOfficeUserStore.cs b/src/Umbraco.Core/Security/BackOfficeUserStore.cs index e37f9d1a54..c6714e256a 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserStore.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Data; +using System.Data.Common; using System.Linq; using System.Threading.Tasks; using System.Web.Security; @@ -97,6 +99,8 @@ namespace Umbraco.Core.Security } _userService.Save(member); + if (member.Id == 0) throw new DataException("Could not create the user, check logs for details"); + //re-assign id user.Id = member.Id; diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 4780d1e768..0eac1958dc 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -549,6 +549,9 @@ namespace Umbraco.Web.Editors else { + if (loginInfo.Email.IsNullOrWhiteSpace()) throw new InvalidOperationException("The Email value cannot be null"); + if (loginInfo.ExternalIdentity.Name.IsNullOrWhiteSpace()) throw new InvalidOperationException("The Name value cannot be null"); + var autoLinkUser = new BackOfficeIdentityUser() { Email = loginInfo.Email,