From 4ec192d2dd6c3da3dd95efdbde28837b615cf032 Mon Sep 17 00:00:00 2001 From: Morten Christensen Date: Mon, 14 Jan 2013 13:18:29 -0100 Subject: [PATCH] Fixes U4-1443 by ensuring that the User Id is passed along to the Save method. --- src/umbraco.cms/businesslogic/web/Document.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs index d95f330055..cf2bd44463 100644 --- a/src/umbraco.cms/businesslogic/web/Document.cs +++ b/src/umbraco.cms/businesslogic/web/Document.cs @@ -345,7 +345,7 @@ namespace umbraco.cms.businesslogic.web //Create a new IContent object based on the passed in DocumentType's alias, set the name and save it IContent content = ApplicationContext.Current.Services.ContentService.CreateContent(ParentId, dct.Alias, u.Id); content.Name = Name; - ApplicationContext.Current.Services.ContentService.Save(content); + ApplicationContext.Current.Services.ContentService.Save(content, u.Id); //read the whole object from the db Document d = new Document(content); @@ -949,7 +949,9 @@ namespace umbraco.cms.businesslogic.web if (!e.Cancel) { - ApplicationContext.Current.Services.ContentService.Save(Content); + var current = User.GetCurrent(); + int userId = current == null ? 0 : current.Id; + ApplicationContext.Current.Services.ContentService.Save(Content, userId); base.Save(); // update preview xml