I have the following query, which works.
$email = db_query('
Select u.init as email
FROM user__roles as r
JOIN users_field_data as u ON r.entity_id = u.uid
WHERE u.status = 1
AND r.roles_target_id = :role
', array('role' => 'pubblisher'))->fetchAll();
I want to convert it to use EntityFieldQuery
, but I didn't find any Join function in the documentation. How do I convert my code to use EntityFieldQuery
?