From eac29badb2fade43dfe3fd6373ffc675858143dd Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 30 Aug 2012 18:17:38 -0700 Subject: start on contacts/profiles --- mod/zfinger.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'mod/zfinger.php') diff --git a/mod/zfinger.php b/mod/zfinger.php index 5b02d4695..550d613b5 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -33,6 +33,17 @@ function zfinger_init(&$a) { $e = $r[0]; + $id = $e['entity_id']; + $r = q("select contact.*, profile.* + from contact left join profile on contact.uid = profile.uid + where contact.uid = %d && contact.self = 1 and profile.is_default = 1 limit 1", + intval($id) + ); + if($r && count($r)) { + $profile = $r[0]; + } + + $ret['success'] = true; // Communication details @@ -43,6 +54,8 @@ function zfinger_init(&$a) { $ret['name'] = $e['entity_name']; $ret['address'] = $e['entity_address']; + $ret['profile'] = $profile; + // array of (verified) hubs this entity uses $ret['hubs'] = array(); @@ -61,9 +74,6 @@ function zfinger_init(&$a) { } } - - // more stuff, e.g. the basic public profile - json_return_and_die($ret); } \ No newline at end of file -- cgit v1.2.3