mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Merge pull request #879 from e-foundation/fix-contacts-suggestions-nextcloud
Add check to unregister system addressbook
This commit is contained in:
commit
dc6674af4a
1 changed files with 6 additions and 0 deletions
|
|
@ -21,6 +21,12 @@ class NextcloudContactsSuggestions implements \RainLoop\Providers\Suggestions\IS
|
|||
return [];
|
||||
}
|
||||
|
||||
// Unregister system addressbook so as to return only contacts in user's addressbooks
|
||||
foreach($cm->getUserAddressBooks() as $addressBook) {
|
||||
if($addressBook->isSystemAddressBook()) {
|
||||
$cm->unregisterAddressBook($addressBook);
|
||||
}
|
||||
}
|
||||
$aSearchResult = $cm->search($sQuery, array('FN', 'NICKNAME', 'TITLE', 'EMAIL'));
|
||||
|
||||
//$this->oLogger->WriteDump($aSearchResult);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue