diff --git a/src/umbraco.cms/businesslogic/media/Media.cs b/src/umbraco.cms/businesslogic/media/Media.cs index 3cfc19bc1e..17594788be 100644 --- a/src/umbraco.cms/businesslogic/media/Media.cs +++ b/src/umbraco.cms/businesslogic/media/Media.cs @@ -251,7 +251,9 @@ namespace umbraco.cms.businesslogic.media if (!e.Cancel) { - ApplicationContext.Current.Services.MediaService.Save(MediaItem); + var current = User.GetCurrent(); + int userId = current == null ? 0 : current.Id; + ApplicationContext.Current.Services.MediaService.Save(MediaItem, userId); base.Save(); diff --git a/src/umbraco.cms/businesslogic/media/MediaType.cs b/src/umbraco.cms/businesslogic/media/MediaType.cs index de0449bd52..46c24305c4 100644 --- a/src/umbraco.cms/businesslogic/media/MediaType.cs +++ b/src/umbraco.cms/businesslogic/media/MediaType.cs @@ -4,6 +4,7 @@ using Umbraco.Core; using Umbraco.Core.Models; using Umbraco.Core.Persistence.Caching; using System.Linq; +using umbraco.BusinessLogic; namespace umbraco.cms.businesslogic.media { @@ -128,7 +129,9 @@ namespace umbraco.cms.businesslogic.media _mediaType.AddContentType(contentType); } - ApplicationContext.Current.Services.ContentTypeService.Save(_mediaType); + var current = User.GetCurrent(); + int userId = current == null ? 0 : current.Id; + ApplicationContext.Current.Services.ContentTypeService.Save(_mediaType, userId); //Ensure that MediaTypes are reloaded from db by clearing cache InMemoryCacheProvider.Current.Clear(); diff --git a/src/umbraco.cms/businesslogic/web/DocumentType.cs b/src/umbraco.cms/businesslogic/web/DocumentType.cs index c6f9c28644..93f3b04aad 100644 --- a/src/umbraco.cms/businesslogic/web/DocumentType.cs +++ b/src/umbraco.cms/businesslogic/web/DocumentType.cs @@ -453,7 +453,9 @@ namespace umbraco.cms.businesslogic.web _contentType.AddContentType(contentType); } - ApplicationContext.Current.Services.ContentTypeService.Save(_contentType); + var current = User.GetCurrent(); + int userId = current == null ? 0 : current.Id; + ApplicationContext.Current.Services.ContentTypeService.Save(_contentType, userId); //Ensure that DocumentTypes are reloaded from db by clearing cache. //NOTE Would be nice if we could clear cache by type instead of emptying the entire cache.