From 93b8f14c4df72df20eef22c1bc4ea9d75baafb59 Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Thu, 28 Jun 2018 14:14:54 +0100 Subject: [PATCH] Fixed #2341 --- .../app/usermanagement/usermanagement.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Ombi/ClientApp/app/usermanagement/usermanagement.component.ts b/src/Ombi/ClientApp/app/usermanagement/usermanagement.component.ts index 486f814ab..74ad37e12 100644 --- a/src/Ombi/ClientApp/app/usermanagement/usermanagement.component.ts +++ b/src/Ombi/ClientApp/app/usermanagement/usermanagement.component.ts @@ -45,6 +45,12 @@ export class UserManagementComponent implements OnInit { this.notificationService.error("Email Notifications are not setup, cannot send welcome email"); return; } + if(!this.emailSettings.notificationTemplates.some(x => { + return x.enabled && x.notificationType === 8; + })) { + this.notificationService.error("The Welcome Email template is not enabled in the Email Setings"); + return; + } this.identityService.sendWelcomeEmail(user).subscribe(); this.notificationService.success(`Sent a welcome email to ${user.emailAddress}`); }