From 4c30cddbfc105c0ea60f30594b760633e654cb0c Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 16 Jul 2013 22:48:05 -0700 Subject: provide a controlling user for theme settings, not necessarily local_user() - can't test on my test site so moving into production and I'll debug it there. --- include/Contact.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/Contact.php b/include/Contact.php index 245682454..466d7f606 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -43,6 +43,8 @@ function channelx_by_n($id) { function vcard_from_xchan($xchan, $observer = null, $mode = '') { + $a = get_app(); + $connect = false; if(local_user()) { $r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", @@ -53,6 +55,9 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { $connect = t('Connect'); } + if(array_key_exists('channel_id',$xchan)) + $a->profile_uid = $xchan['channel_id']; + $url = (($observer) ? z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr'] : $xchan['xchan_url'] -- cgit v1.2.3