1
0
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:
Thomas Tanghus 2012-08-30 13:55:57 +02:00
parent 7579cce3db
commit 69c4274187

View File

@ -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.