vcard export from profile

This commit is contained in:
zotlabs
2017-01-15 21:23:43 -08:00
parent 0ef2cd8719
commit e5662dc893
3 changed files with 21 additions and 1 deletions

View File

@@ -60,7 +60,9 @@ class Profile extends \Zotlabs\Web\Controller {
}
$groups = array();
$tab = 'profile';
$o = '';
@@ -69,6 +71,15 @@ class Profile extends \Zotlabs\Web\Controller {
return;
}
if(argc() > 2 && argv(2) === 'vcard') {
header('Content-type: text/vcard');
header('content-disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' );
echo \App::$profile['profile_vcard'];
killme();
}
$is_owner = ((local_channel()) && (local_channel() == \App::$profile['profile_uid']) ? true : false);