From ae39256a84b1ae705982681f14d3fffc81a550eb Mon Sep 17 00:00:00 2001 From: nikolajlauridsen Date: Thu, 7 Oct 2021 12:49:36 +0200 Subject: [PATCH] Specify constructor for DI --- .../Controllers/CurrentUserController.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs b/src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs index 010957f9d8..16b6590e57 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs @@ -52,6 +52,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers private readonly IPasswordChanger _passwordChanger; private readonly IUserDataService _userDataService; + [ActivatorUtilitiesConstructor] public CurrentUserController( MediaFileManager mediaFileManager, IOptions contentSettings, @@ -95,8 +96,8 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers ILocalizedTextService localizedTextService, AppCaches appCaches, IShortStringHelper shortStringHelper, - IPasswordChanger passwordChanger) : - this(mediaFileManager, + IPasswordChanger passwordChanger) : this( + mediaFileManager, contentSettings, hostingEnvironment, imageUrlGenerator, @@ -197,10 +198,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers return userTours; } - public IEnumerable GetUserData() - { - return _userDataService.GetUserData(); - } + public IEnumerable GetUserData() => _userDataService.GetUserData(); /// /// When a user is invited and they click on the invitation link, they will be partially logged in