export should always "save to file" by default
This commit is contained in:
parent
2ae2bb4191
commit
4734e2ea87
@ -4,12 +4,22 @@ function uexport_init(&$a) {
|
||||
if(! local_user())
|
||||
killme();
|
||||
|
||||
$channel = $a->get_channel();
|
||||
|
||||
require_once('include/identity.php');
|
||||
|
||||
if(argc() > 1 && argv(1) === 'basic')
|
||||
json_return_and_die(identity_basic_export(local_user()));
|
||||
header('content-type: application/octet_stream');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . '.json"' );
|
||||
|
||||
if(argc() > 1 && argv(1) === 'complete')
|
||||
json_return_and_die('not yet implemented');
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user