Add permission to use Gravatar

NealC

Well-known member
We use a permission to user groups to allow Avatars but this is worked around with Gravatar. Please put Gravatar use under a permission control so we can make profile images (avatar) controlled for all uses.
 
Upvote 4
Hello, in the meantime you can edit the account_avatar template:
Find (line 45)
HTML:
<xf:if is="$xf.options.gravatarEnable">
Replace by
HTML:
<xf:if is="$xf.options.gravatarEnable AND $xf.visitor.isMemberOf([X, Y, Z])">
Where X, Y or Z are the usergroup IDs to which you authorize the use of Gravatar.
 
Hello, in the meantime you can edit the account_avatar template:
Find (line 45)
HTML:
<xf:if is="$xf.options.gravatarEnable">
Replace by
HTML:
<xf:if is="$xf.options.gravatarEnable AND $xf.visitor.isMemberOf([X, Y, Z])">
Where X, Y or Z are the usergroup IDs to which you authorize the use of Gravatar.
Thanks for this. My only concern is if the permission is not available at registration XF may not fetch the gravatar. I'm not sure how frequently it's polled/updated. I may give it a try and see though.
 
You don't set the avatar/gravatar at the registration level so i guess there will be no issue here.
That's the thing, you do though:

If enabled, your users may source their avatars from Gravatar. When a new user registers, XenForo will automatically search for a Gravatar associated with their email address. If disabled, this will not remove Gravatars from users that already have them.

Your edit would simply target this:
1677000065842.png


Which users would still have the Gravatar applied from registration.
 
Back
Top Bottom