diff --git a/Providers/MMFRestrictedCustomersServiceProvider.php b/Providers/MMFRestrictedCustomersServiceProvider.php index 7bd8bdb..ebf9159 100644 --- a/Providers/MMFRestrictedCustomersServiceProvider.php +++ b/Providers/MMFRestrictedCustomersServiceProvider.php @@ -44,7 +44,7 @@ class MMFRestrictedCustomersServiceProvider extends ServiceProvider { // Get IDs of mailboxes the current user is allowed to access. $mailboxes = $user->mailboxesIdsCanView(); // Restrict the query to the Customers the current user is allowed to access. - $query_customers->whereIn('customers.mailbox_id', $mailbox_ids); + $query_customers->whereIn('customers.mailbox_id', $mailboxes); } return $query_customers; });