use EntityFieldQuery to find user based on profile field value
$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'user')
  -&gt;fieldCondition('field_user_payroll', 'value', $payroll, '=');
$results = $query-&gt;execute();

$users = user_load_multiple(array_keys($results['user']));
foreach($users as $user) {
    $wrapper = entity_metadata_wrapper('user', $account);
    $mimemail = $wrapper-&gt;mimemail-&gt;raw();

    watchdog('Photo Import', "Mimemail: %mimemail", array('%mimemail' =&gt; $mimemail), WATCHDOG_INFO);
}


as per EntityFieldQuery::fieldCondition(), EntityFieldQuery doc

......