From d68553e01d3064bbf3df25f733e3d29d1da1feca Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 7 Mar 2014 07:54:14 -0500 Subject: [PATCH] Do not send ticket emails to disabled users --- src/main/java/com/gitblit/tickets/TicketNotifier.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gitblit/tickets/TicketNotifier.java b/src/main/java/com/gitblit/tickets/TicketNotifier.java index a8ebc9e7..313f1a7d 100644 --- a/src/main/java/com/gitblit/tickets/TicketNotifier.java +++ b/src/main/java/com/gitblit/tickets/TicketNotifier.java @@ -523,7 +523,7 @@ public class TicketNotifier { Set toAddresses = new TreeSet(); for (String name : ticket.getParticipants()) { UserModel user = userManager.getUserModel(name); - if (user != null) { + if (user != null && !user.disabled) { if (!StringUtils.isEmpty(user.emailAddress)) { if (user.canView(repository)) { toAddresses.add(user.emailAddress); @@ -561,7 +561,7 @@ public class TicketNotifier { Set ccAddresses = new TreeSet(); for (String name : ccs) { UserModel user = userManager.getUserModel(name); - if (user != null) { + if (user != null && !user.disabled) { if (!StringUtils.isEmpty(user.emailAddress)) { if (user.canView(repository)) { ccAddresses.add(user.emailAddress); -- 2.39.5