From c9f868dd3c7fef6c7563863b0773078b118645ed Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 7 Mar 2018 09:35:28 +0100 Subject: [PATCH] UserId zero means null users, not super --- src/Umbraco.Core/Services/EntityXmlSerializer.cs | 4 ++-- src/Umbraco.Examine/UmbracoContentIndexer.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Services/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/EntityXmlSerializer.cs index 64e3089ea6..681b91f772 100644 --- a/src/Umbraco.Core/Services/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/EntityXmlSerializer.cs @@ -47,9 +47,9 @@ namespace Umbraco.Core.Services xml.Add(new XAttribute("nodeType", content.ContentType.Id)); xml.Add(new XAttribute("nodeTypeAlias", content.ContentType.Alias)); - xml.Add(new XAttribute("creatorName", content.GetCreatorProfile(userService).Name)); + xml.Add(new XAttribute("creatorName", content.GetCreatorProfile(userService)?.Name ?? "??")); //xml.Add(new XAttribute("creatorID", content.CreatorId)); - xml.Add(new XAttribute("writerName", content.GetWriterProfile(userService).Name)); + xml.Add(new XAttribute("writerName", content.GetWriterProfile(userService)?.Name ?? "??")); xml.Add(new XAttribute("writerID", content.WriterId)); xml.Add(new XAttribute("template", content.Template?.Id.ToString(CultureInfo.InvariantCulture) ?? "0")); diff --git a/src/Umbraco.Examine/UmbracoContentIndexer.cs b/src/Umbraco.Examine/UmbracoContentIndexer.cs index 54d1ae8471..3fddf4a762 100644 --- a/src/Umbraco.Examine/UmbracoContentIndexer.cs +++ b/src/Umbraco.Examine/UmbracoContentIndexer.cs @@ -325,8 +325,8 @@ namespace Umbraco.Examine {"urlName", new object[] {urlValue}}, {"path", new object[] {c.Path}}, {"nodeType", new object[] {c.ContentType.Id}}, - {"creatorName", new object[] {c.GetCreatorProfile(UserService).Name}}, - {"writerName", new object[] {c.GetWriterProfile(UserService).Name}}, + {"creatorName", new object[] {c.GetCreatorProfile(UserService)?.Name ?? "??"}}, + {"writerName", new object[] {c.GetWriterProfile(UserService)?.Name ?? "??"}}, {"writerID", new object[] {c.WriterId}}, {"template", new object[] {c.Template?.Id ?? 0}} };