mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Make sure default addressbook is created.
This commit is contained in:
parent
7579cce3db
commit
69c4274187
@ -13,7 +13,7 @@ OCP\User::checkLoggedIn();
|
||||
OCP\App::checkAppEnabled('contacts');
|
||||
|
||||
// Get active address books. This creates a default one if none exists.
|
||||
$ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser());
|
||||
$ids = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
||||
$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0
|
||||
? true
|
||||
: false); // just to check if there are any contacts.
|
||||
|
Loading…
Reference in New Issue
Block a user