X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Ftheme.php;h=9434b340d219fb35e80acbd06fb62652337972d6;hb=2bd62bfdea6ba720c43683a9b747f9c10d389084;hp=d51c346c65e2d89632d16f704aa8aa47a3ca7cb5;hpb=7918e4109780d674084468998d47a0dd67bcb483;p=friendica.git diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index d51c346c65..9434b340d2 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -237,7 +237,6 @@ function frio_remote_nav($a, &$nav) } elseif (!local_user() && remote_user()) { $r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user())); $nav['remote'] = L10n::t('Guest'); - $remoteUser = $r[0]; } elseif (Model\Profile::getMyURL()) { $r = q("SELECT `name`, `nick`, `photo` FROM `gcontact` WHERE `addr` = '%s' AND `network` = 'dfrn'", @@ -247,14 +246,16 @@ function frio_remote_nav($a, &$nav) $r = false; } + $remoteUser = null; if (DBA::isResult($r)) { $nav['userinfo'] = [ 'icon' => (DBA::isResult($r) ? $r[0]['photo'] : 'images/person-48.jpg'), 'name' => $r[0]['name'], ]; + $remoteUser = $r[0]; } - if (!local_user() && !empty($server_url)) { + if (!local_user() && !empty($server_url) && !is_null($remoteUser)) { $nav['logout'] = [$server_url . '/logout', L10n::t('Logout'), '', L10n::t('End this session')]; // user menu