Our company use FengOffice as database of contacts and organisations.
But for email we didn't use integrated modules, use mail applications (thunderbird, kmail, outlook, etc) and some other software.
And at now we need to duplicate current client database in each application that is not so good. And manually create records in mobile phones too.
Many software can work with vcard file as contacts database (for example, Akonadi), but at now I must manually select which contacts must be exported and update file manually. And I can't select all contacts in fengoffice, but only one page.
I have added the copy of function export_to_vcard() to file
application/controllers/ContactController.class.php with some modifications:
function export_to_vcard_all() {
$contacts = array();
$ids = explode(",", $ids);
$allowed = Contacts::instance()->getAllowedContacts();
foreach ($allowed as $c) {
$contacts[] = $c;
}
if (count($contacts) == 0) {
flash_error(lang("you must select the contacts from the grid"));
ajx_current("empty");
return;
}
$data = self::build_vcard($contacts);
$name = (count($contacts) == 1 ? $contacts[0]->getDisplayName() : "contacts") . ".vcf";
download_contents($data, 'text/x-vcard', $name, strlen($data), true);
die();
}
After this I can export all available to user contacts via url
http://opengoo.domain.ru/index.php?c=contact&a=export_to_vcard_allBut I can't do this via cron or another automated process, because I need to export it via authenticated in FengOffice user.
Can anybody tell how I can authenticate in FengOffice via some params in url or via curl() functiona and cookie/session files?