1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 13:44:12 +02:00

[ticket/15233] Standardize avatar output variables

PHPBB3-15233
This commit is contained in:
mrgoldy
2019-12-16 20:23:45 +01:00
committed by Marc Alexander
parent 3137070d50
commit 7e3d22063a
16 changed files with 182 additions and 50 deletions

View File

@@ -757,11 +757,20 @@ class ucp_profile
$error = $phpbb_avatar_manager->localize_errors($user, $error);
}
$avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true);
/** @var \phpbb\avatar\helper $avatar_helper */
$avatar_helper = $phpbb_container->get('avatar.helper');
$avatar = $avatar_helper->get_user_avatar($user->data, 'USER_AVATAR', true);
$template->assign_vars(array(
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
'AVATAR' => $avatar,
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
'AVATAR' => $avatar['html'],
'AVATAR_LAZY' => $avatar['lazy'],
'AVATAR_SOURCE' => $avatar['src'],
'AVATAR_TITLE' => $avatar['title'],
'AVATAR_TYPE' => $avatar['type'],
'AVATAR_WIDTH' => $avatar['width'],
'AVATAR_HEIGHT' => $avatar['height'],
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',