could you help me to fix my problem? note: each user have two field (fields are taxonomy reference)

I want to get two fields with OR condition the output of my code returns in the shape of AND result

here is my code :

 $query = new EntityFieldQuery();
  $query->entityCondition('entity_type', 'user')
        ->propertyCondition('status', 1)
        ->fieldCondition('field_software_abilities', 'tid', $abilities, 'IN')
    ->fieldCondition('field_other_abilities', 'tid', $abilities, 'IN');
    $result = $query->execute();

I read an article about using addtag and hook_query_tag_alter() but I can't use it


1 Answer 1


EntityFieldQuery does not support 'OR' operators. There is a workaround presented here 'OR' Queries with EntityFieldQuery where an 'OR' operator is added.

  • thank you for your answer I read this article but I can't use it in my code would you please tell me how I can use that? May 27, 2014 at 9:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.