diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-24 22:14:29 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-24 22:14:29 -0400 |
commit | 47ec4d89bccdd2abfda21d818b0f27d389324cc8 (patch) | |
tree | 8843d16f3c4020f8b4eef36897ae99ae6130c4a4 /app/Model/UserNotification.php | |
parent | 8ba05940e9ee76e95ce808d8da163c2af29e4e93 (diff) |
Do not send notifications to disabled users
Diffstat (limited to 'app/Model/UserNotification.php')
-rw-r--r-- | app/Model/UserNotification.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Model/UserNotification.php b/app/Model/UserNotification.php index fcd1761b..6882e671 100644 --- a/app/Model/UserNotification.php +++ b/app/Model/UserNotification.php @@ -162,8 +162,9 @@ class UserNotification extends Base ->table(ProjectUserRole::TABLE) ->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name', User::TABLE.'.email', User::TABLE.'.language', User::TABLE.'.notifications_filter') ->join(User::TABLE, 'id', 'user_id') - ->eq('project_id', $project_id) - ->eq('notifications_enabled', '1') + ->eq(ProjectUserRole::TABLE.'.project_id', $project_id) + ->eq(User::TABLE.'.notifications_enabled', '1') + ->eq(User::TABLE.'.is_active', 1) ->neq(User::TABLE.'.id', $exclude_user_id) ->findAll(); } @@ -178,6 +179,7 @@ class UserNotification extends Base ->eq(ProjectGroupRole::TABLE.'.project_id', $project_id) ->eq(User::TABLE.'.notifications_enabled', '1') ->neq(User::TABLE.'.id', $exclude_user_id) + ->eq(User::TABLE.'.is_active', 1) ->findAll(); } @@ -195,6 +197,7 @@ class UserNotification extends Base ->columns(User::TABLE.'.id', User::TABLE.'.username', User::TABLE.'.name', User::TABLE.'.email', User::TABLE.'.language', User::TABLE.'.notifications_filter') ->eq('notifications_enabled', '1') ->neq(User::TABLE.'.id', $exclude_user_id) + ->eq(User::TABLE.'.is_active', 1) ->findAll(); } } |