From f1380e6af43430b1e2f6d4de209c58f371cfbe14 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 4 Aug 2020 20:15:42 +0000 Subject: [PATCH 1/2] Issue 8967: Fix avatar in top bar --- view/theme/frio/theme.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index dcbeccc301..3ac04fced5 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -195,8 +195,7 @@ function frio_remote_nav($a, &$nav) // this isn't optimal because the contact query will be done now twice $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl']; if (local_user() && !empty($a->user['uid'])) { - $remoteUser = Contact::getById($a->user['uid'], $fields); - $remoteUser['name'] = $a->user['username']; + $remoteUser = DBA::selectFirst('contact', $fields, ['uid' => $a->user['uid'], 'self' => true]); } elseif (!local_user() && remote_user()) { $remoteUser = Contact::getById(remote_user(), $fields); $nav['remote'] = DI::l10n()->t('Guest'); From 0224bc8367731ec11003971e90cdb92b4969c815 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 5 Aug 2020 05:39:00 +0200 Subject: [PATCH 2/2] Update view/theme/frio/theme.php Co-authored-by: Hypolite Petovan --- view/theme/frio/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 3ac04fced5..efba167798 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -195,7 +195,7 @@ function frio_remote_nav($a, &$nav) // this isn't optimal because the contact query will be done now twice $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl']; if (local_user() && !empty($a->user['uid'])) { - $remoteUser = DBA::selectFirst('contact', $fields, ['uid' => $a->user['uid'], 'self' => true]); + $remoteUser = Contact::selectFirst($fields, ['uid' => $a->user['uid'], 'self' => true]); } elseif (!local_user() && remote_user()) { $remoteUser = Contact::getById(remote_user(), $fields); $nav['remote'] = DI::l10n()->t('Guest');