Merge pull request #8974 from annando/issue-8967

Issue 8967: Fix avatar in top bar
This commit is contained in:
Hypolite Petovan 2020-08-05 10:30:20 -04:00 committed by GitHub
commit 8042119447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = 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');