diff --git a/plugins/system/webauthn/src/Helper/CredentialsCreation.php b/plugins/system/webauthn/src/Helper/CredentialsCreation.php index 21880deb4dd51..b16f3e272a791 100644 --- a/plugins/system/webauthn/src/Helper/CredentialsCreation.php +++ b/plugins/system/webauthn/src/Helper/CredentialsCreation.php @@ -96,8 +96,7 @@ public static function createPublicKey(User $user): string $userEntity = new PublicKeyCredentialUserEntity( $user->username, $repository->getHandleFromUserId($user->id), - $user->name, - self::getAvatar($user, 64) + $user->name ); // Challenge @@ -356,22 +355,4 @@ protected static function getSiteIcon(): ?string return rtrim(Uri::base(), '/') . '/' . ltrim($relFile, '/'); } - - /** - * Get the user's avatar (through Gravatar) - * - * @param User $user The Joomla user object - * @param int $size The dimensions of the image to fetch (default: 64 pixels) - * - * @return string The URL to the user's avatar - * - * @since 4.0.0 - */ - public static function getAvatar(User $user, int $size = 64) - { - $scheme = Uri::getInstance()->getScheme(); - $subdomain = ($scheme == 'https') ? 'secure' : 'www'; - - return sprintf('%s://%s.gravatar.com/avatar/%s.jpg?s=%u&d=mm', $scheme, $subdomain, md5($user->email), $size); - } }