streams/mod/uexport.php

25 lines
511 B
PHP
Raw Normal View History

2011-03-22 10:07:46 +00:00
<?php
function uexport_init(&$a) {
if(! local_user())
killme();
$channel = $a->get_channel();
require_once('include/identity.php');
header('content-type: application/octet_stream');
header('content-disposition: attachment; filename="' . $channel['channel_address'] . '.json"' );
2011-03-22 10:07:46 +00:00
if(argc() > 1 && argv(1) === 'basic') {
echo json_encode(identity_basic_export(local_user()));
killme();
}
if(argc() > 1 && argv(1) === 'complete') {
echo json_encode('not yet implemented');
killme();
}
2011-03-22 10:07:46 +00:00
}