Skip to content

Commit

Permalink
Fix specifying fields to return vs search.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 9, 2019
1 parent 857d98c commit 26d282a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Horde/Core/ActiveSync/Connector.php
Expand Up @@ -513,17 +513,19 @@ public function resolveRecipient($query, array $opts = array())
if (!in_array($gal, $sources)) {
$sources[] = $gal;
}
$returnFields = array();
foreach ($sources as $source) {
$fields[$source] = array('name', 'email', 'alias', 'smimePublicKey');
$fields[$source] = array('email');
$returnFields[$source] = array('name', 'email', 'alias', 'smimePublicKey');
if (!empty($opts['pictures'])) {
$fields[$source]['photo'];
$returnFields[$source]['photo'];
}
}

$options = array(
'matchBegin' => true,
'sources' => $sources,
'fields' => $fields
'returnFields' => $fields
);
if (isset($opts['maxAmbiguous']) && $opts['maxAmbiguous'] == 0) {
$options['customStrict'] = array('email', 'name', 'alias');
Expand Down

0 comments on commit 26d282a

Please sign in to comment.