check if user exists
To get the users filtered based on profile2 field, field_ngouniqueid is created through profile2

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'profile2')
-&gt;fieldCondition('field_ngouniqueid', 'value', (int)$company_id, '=');
$results = $query-&gt;execute();

$users = user_load_multiple(array_keys($results['user']));