How to load taxonomy terms from user profile field using entityfieldquery()? I want to write hook_node_form_alter() and limit taxonomy terms with only user checked terms on his profile in field_companies.
I can't pass the 1st step - load array of user checked terms from field_companies using entityfieldquery.
This code does not work:

$query = new EntityFieldQuery();

$result = $query
  -&gt;entityCondition('entity_type', 'user')
  -&gt;entityCondition('bundle', 'user')
  -&gt;fieldCondition('field_companies', 'entity_id', $user-&gt;uid)
  -&gt;execute();


The error message is:

PDOException: SQLSTATE[42S22]: Column not found: 1054 
Unknown column 'field_data_field_companies0.field_companies_entity_id' in 'where clause': 
SELECT DISTINCT field_data_field_companies0.entity_type 
AS entity_type, field_data_field_companies0.entity_id AS entity_id, field_data_field_companies0.revision_id AS revision_id, field_data_field_companies0.bundle AS bundle
 FROM {field_data_field_companies} field_data_field_companies0 
WHERE (field_data_field_companies0.field_companies_entity_id = :db_condition_placeholder_0) 
AND (field_data_field_companies0.deleted = :db_condition_placeholder_1) 
AND (field_data_field_companies0.entity_type = :db_condition_placeholder_2) ; 
Array ( [:db_condition_placeholder_0] =&gt; 1 [:db_condition_placeholder_1] =&gt; 0 [:db_condition_placeholder_2] =&gt; user ) in function field_sql_storage_field_storage_query() 
(line 632 in file modules/field/modules/field_sql_storage/field_sql_storage.module)


This query does not give terms, but only array with user[uid]=1 :

$query = new EntityFieldQuery();
$term_entities = $query
  -&gt;entityCondition('entity_type', 'user')
  -&gt;entityCondition('bundle', 'user')
  -&gt;entityCondition('entity_id', $user-&gt;uid) 
  -&gt;fieldCondition('field_companies', 'tid', 0, '&gt;=')
  -&gt;execute();
SOLVED with my module user_referenced_taxonomy_terms
code has quality 60%. you need to read it and correct if your fields has other names. this code works in my site.

/*displays only user checked companies in node addition form in field_company*/
/* field_companies - user profile field  */
/* field_company - node field */

function profile_taxonomy_on_node_addition_form_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  global $user;
  //if current user has roles administrator or editor return
  foreach ($user-&gt;roles as $role) {
      if (($role == 'administrator') || ($role == 'editor')) return;
  }
  if (isset($form['field_company'])) {
    //get user checked terms companies
    $terms = db_select('field_data_field_companies', 'c')
       -&gt;fields('c', array('field_companies_tid'))
       -&gt;condition('c.entity_id', $user-&gt;uid)
       -&gt;execute()
       -&gt;fetchCol();
    if ($terms) {
        //forming array of firms using $terms array
        $count=count($terms);
        foreach ($form['field_company']['und']['#options'] as $key=&gt;$value) {
            if ($key == '_none') continue;
            $delete=true;
            for ($i=0;$i&lt;$count;$i++) {
                if ($key == $terms[$i]) $delete = FALSE;
            }
            if ($delete) $form['field_company']['und'][$key]= array('#access' =&gt; FALSE);
        }
    }else {
        //hide field firm if user has no access to any term
        $form['field_company']['#access'] = FALSE;
    }
  }
}


PS: with ur comment i optimized this code. 
fetchAll() gives array of objects i do not need in objects and this is not optimal.
fetchCol() gives array that exactly i need. 
but fetchAllKeyed() gives only one element. 
thank you Paul!