This commit is contained in:
phpBB TR 2024-06-02 11:48:57 +02:00 committed by GitHub
commit bef6927bb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3620,6 +3620,16 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
$avatar_data['src'] = '';
}
// Default avatar display
if (!$avatar_data['src'])
{
$phpbb_path_helper = $phpbb_container->get('path_helper');
$web_path = $phpbb_path_helper->get_web_root_path();
$theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme';
$src = 'src="' . $theme . '/images/no_avatar.gif"';
$html = '<img class="avatar" ' . $src . ' ' . 'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
if (empty($html) && !empty($avatar_data['src']))
{
if ($lazy)