search address book for federated cloud id
This commit is contained in:
parent
7a3cfbc3c8
commit
f9dcb559e9
|
@ -352,8 +352,24 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
|
|||
)
|
||||
);
|
||||
}
|
||||
$contactManager = \OC::$server->getContactsManager();
|
||||
$addressBookContacts = $contactManager->search($_GET['search'], ['CLOUD', 'FN']);
|
||||
foreach ($addressBookContacts as $contact) {
|
||||
if (isset($contact['CLOUD'])) {
|
||||
foreach ($contact['CLOUD'] as $cloudId) {
|
||||
$shareWith[] = array(
|
||||
'label' => $contact['FN'] . ' (' . $cloudId . ')',
|
||||
'value' => array(
|
||||
'shareType' => \OCP\Share::SHARE_TYPE_REMOTE,
|
||||
'shareWith' => $cloudId
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$sorter = new \OC\Share\SearchResultSorter((string)$_GET['search'],
|
||||
'label',
|
||||
\OC::$server->getLogger());
|
||||
|
|
Loading…
Reference in New Issue