mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-27 00:36:44 +03:00
Add check to unregister system addressbook
Signed-off-by: Akhil <akhil.potukuchi@gmail.com>
This commit is contained in:
parent
3b43a8bc78
commit
6dff9cd781
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