OpenRA / openrauseraccounts

Connect phpBB forum accounts to OpenRA installations
https://forum.openra.net/ucp.php?i=232
GNU General Public License v2.0
3 stars 3 forks source link

Refactor avatar handling. #52

Open deleted-user-1 opened 3 years ago

deleted-user-1 commented 3 years ago

PhpBB's driver->get_data() method does not expose absolute URLs and we need special handling for every avatar type due to each using a different URL pattern. We therefore have to hardcode the avatar type name and path fragments and depend on internals with which we will need to maintain compatibility in case of future upstream changes. Using our own implementation with less overhead does not introduce further costs in this case.

I have tested this locally with all avatar types (gallery, file upload, upload from url, remote, gravatar) including customized image sizes and with legacy integer user_avatar_type.

Notes:

'core.get_gravatar_url_after' is an event only for customization and not used by phpBB internally, so we do not need this until we want to modify gravatars.