Moved more files to abstractions
This commit is contained in:
@@ -40,9 +40,12 @@ namespace Umbraco.Web.Editors
|
||||
[IsCurrentUserModelFilter]
|
||||
public class UsersController : UmbracoAuthorizedJsonController
|
||||
{
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
|
||||
public UsersController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
|
||||
: base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper)
|
||||
{
|
||||
_globalSettings = globalSettings;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -343,7 +346,7 @@ namespace Umbraco.Web.Editors
|
||||
throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
|
||||
}
|
||||
|
||||
if (EmailSender.CanSendRequiredEmail == false)
|
||||
if (EmailSender.CanSendRequiredEmail(_globalSettings) == false)
|
||||
{
|
||||
throw new HttpResponseException(
|
||||
Request.CreateNotificationValidationErrorResponse("No Email server is configured"));
|
||||
@@ -473,7 +476,7 @@ namespace Umbraco.Web.Editors
|
||||
await UserManager.EmailService.SendAsync(
|
||||
//send the special UmbracoEmailMessage which configures it's own sender
|
||||
//to allow for events to handle sending the message if no smtp is configured
|
||||
new UmbracoEmailMessage(new EmailSender(true))
|
||||
new UmbracoEmailMessage(new EmailSender(_globalSettings, true))
|
||||
{
|
||||
Body = emailBody,
|
||||
Destination = userDisplay.Email,
|
||||
|
||||
Reference in New Issue
Block a user