]> granicus.if.org Git - icinga2/commitdiff
Don't send notifications for users who have enable_notifications = false
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 9 Jul 2014 06:56:16 +0000 (08:56 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 9 Jul 2014 06:56:16 +0000 (08:56 +0200)
fixes #6671

lib/icinga/notification.cpp

index aed249350c75bdb52da935dd3c259d992747d54e..2e5cb234d0ee95c79afa1b04f493ca3a4db08fa3 100644 (file)
@@ -300,7 +300,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 
        std::set<User::Ptr> allNotifiedUsers;
        BOOST_FOREACH(const User::Ptr& user, allUsers) {
-               if (!CheckNotificationUserFilters(type, user, force))
+               if (!user->GetEnableNotifications() || !CheckNotificationUserFilters(type, user, force))
                        continue;
 
                Log(LogInformation, "Notification", "Sending notification for user '" + user->GetName() + "'");