From c9d8fa7fe5d40ddc0715a36d95b1a72617b92769 Mon Sep 17 00:00:00 2001 From: eSilverStrike Date: Mon, 7 Sep 2020 09:54:04 -0400 Subject: [PATCH] Fix for Auto Generated Avatar Image when Letters not Centered Issue is with older MS Edge browser. Now return png instead of svg. Once issue fixed by image provider should revert back to svg. See: https://github.com/LasseRafn/ui-avatars/issues/37#issuecomment-688314690 --- system/lib-user.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/lib-user.php b/system/lib-user.php index 880cda951..1c5425f86 100644 --- a/system/lib-user.php +++ b/system/lib-user.php @@ -582,8 +582,9 @@ function USER_generateUserICON($uid, $width = 0, $cssClasses = '', $anonName = ' $text_color = _textColorBasedOnBgColor($bg_color, 'FFFFFF', '000000'); // See https://ui-avatars.com/ for API // See https://github.com/LasseRafn/php-initial-avatar-generator and https://github.com/LasseRafn/ui-avatars for github libraries + // Fix Letter offset issue for MS Edge 11. Specify png instead of default svg. See https://github.com/LasseRafn/ui-avatars/issues/37#issuecomment-688314690 (Note: Should set back to svg once issue fixed) $extrasettings = PLG_getThemeItem('core-auto-generated-user-avatar-settings', 'core'); - $retval = ' 0) { // Since a square is returned set height as well