1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 05:34:01 +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

@@ -1968,12 +1968,22 @@ class acp_users
$error = $phpbb_avatar_manager->localize_errors($user, $error);
}
$avatar = phpbb_get_user_avatar($user_row, 'USER_AVATAR', true);
/** @var \phpbb\avatar\helper $avatar_helper */
$avatar_helper = $phpbb_container->get('avatar.helper');
$avatar = $avatar_helper->get_user_avatar($user_row, 'USER_AVATAR', true);
$template->assign_vars(array(
'S_AVATAR' => true,
'ERROR' => (!empty($error)) ? implode('<br />', $error) : '',
'AVATAR' => (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
'AVATAR' => empty($avatar['html']) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $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"',