This commit is contained in:
2021-05-09 16:32:49 +02:00
parent f906d1dc00
commit 2173f122f8
2 changed files with 12 additions and 1 deletions

View File

@ -20,7 +20,10 @@ function get_page_header(
$newpoll_class = '';
if ($api->isAuthenticated(false, true)) {
$u = $api->getAuthorizedUser();
$greeting = 'Welcome, ' . ($u->name ?? '@'.$u->username);
$user_avatar_url = $u->getAvatarUrl(30);
$user_avatar_url_srcset = get_source_set($u, 30);
$avatar = '<img src="' . $user_avatar_url . '" class="avatar" srcset="' . $user_avatar_url_srcset . '"/>';
$greeting = $avatar . 'Welcome, ' . ($u->name ?? '@'.$u->username);
$logout_link = '<a href="logout.php" class="logout">Logout</a>';
} else {
$newpoll_class = 'disabled';