Details
Description
To reproduce
Use an ACL hook to set users permissions - do not give View All Contacts.
User can send CiviMail but even though they can see the recipients in CiviCRM when it is sent there are no recipients
because there are no entries in civicrm_acl_cache & the contstructed query contains LEFT JOIN acl_civicrm_contact ON x = y WHERE contact_id = z returns nothing. I presume it must work for 'normal' ACLs but for those set by hooks it 'breaks' civi mail
Attached patch is just how we fixed for our client but only disables ACL checking - not a real fix