diff options
author | friendica <info@friendica.com> | 2012-08-30 18:17:38 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-08-30 18:17:38 -0700 |
commit | eac29badb2fade43dfe3fd6373ffc675858143dd (patch) | |
tree | ecf3ec6007a22a755900c46a4bc1e4862cc08d06 /mod/zfinger.php | |
parent | f6d198ce5dcd9fe416975ff760439dfacbb83812 (diff) | |
download | volse-hubzilla-eac29badb2fade43dfe3fd6373ffc675858143dd.tar.gz volse-hubzilla-eac29badb2fade43dfe3fd6373ffc675858143dd.tar.bz2 volse-hubzilla-eac29badb2fade43dfe3fd6373ffc675858143dd.zip |
start on contacts/profiles
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r-- | mod/zfinger.php | 16 |
1 files changed, 13 insertions, 3 deletions
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 |