This approach is cleaner and probably even faster the previous ways that
included using array_walk() or array_map() and other helper functions
and methods.
PHPBB3-11525
The service collection that was already passed to the avatar manager should
be used in the avatar manager method get_driver() instead of the container
itself.
PHPBB3-11857
Until now, the user data had both user_id and group_id keys in the avatar
data. As both group_ and user_ prefixes were removed the group_id was
collapsed onto the user_id and therefore all users in the same group had
the same prefix for their uploaded avatars. This patch will make sure
that the correct id is used depending on whether it's a group's or user's
avatar data.
PHPBB3-11525