1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

fix array intersect

This commit is contained in:
Benjamin Beganović 2020-06-16 12:53:21 +02:00
parent ff82d7df06
commit 5e6f32dac1

View File

@ -57,7 +57,7 @@ trait UserNotifies
array_push($required_permissions, "all_user_notifications");
}
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, "all_user_notifications")) >=1 || count(array_intersect($required_permissions, "all_notifications")) >=1) {
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >=1 || count(array_intersect($required_permissions, ['all_notifications'])) >=1) {
array_push($notifiable_methods, 'mail');
}
@ -73,7 +73,7 @@ trait UserNotifies
$notifiable_methods = [];
$notifications = $company_user->notifications;
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, "all_user_notifications")) >=1 || count(array_intersect($required_permissions, "all_notifications")) >=1) {
if (count(array_intersect($required_permissions, $notifications->email)) >=1 || count(array_intersect($required_permissions, ['all_user_notifications'])) >=1 || count(array_intersect($required_permissions, ['all_notifications'])) >=1) {
array_push($notifiable_methods, 'mail');
}