LPH
Well-known member
It's possible to pull whether or not dynamic avatars is enabled using
Currently, the following is used in a method:
This pulls the gravatar and the XenForo 2 uploaded avatar ... but not the dynamic avatar. Does anyone have any suggestions?
$dynamicAvatarEnable = \XF::options()->dynamicAvatarEnable;
; however, I tried to dump($user)
to see if there was a way to determine a path or a way to get the dynamic avatar. I'm not seeing how to get the dynamic avatar to show up on an external site.Currently, the following is used in a method:
PHP:
$finder = \XF::finder('XF:User');
$user = $finder->where( 'user_id', $id)->fetchOne();
\XF::dump($user); // Dump to see what is inside $user
if ($user->avatar_date || $user->gravatar) {
$xf_avatar_url = \XF::app()->request()->convertToAbsoluteUri( $user->getAvatarUrl( 'm', null, true ) );
}
This pulls the gravatar and the XenForo 2 uploaded avatar ... but not the dynamic avatar. Does anyone have any suggestions?