mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #3805 from beganovich/fix-array_intersect
fix array intersect
This commit is contained in:
commit
b82e71cd61
@ -57,7 +57,7 @@ trait UserNotifies
|
|||||||
array_push($required_permissions, "all_user_notifications");
|
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');
|
array_push($notifiable_methods, 'mail');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ trait UserNotifies
|
|||||||
$notifiable_methods = [];
|
$notifiable_methods = [];
|
||||||
$notifications = $company_user->notifications;
|
$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');
|
array_push($notifiable_methods, 'mail');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user