Mark User.gravatar() as deprecated

We're using self-hosted avatars instead.
See `pillar.api.users.avatar.url()` in the Pillar source code instead.
This commit is contained in:
2019-05-31 14:18:40 +02:00
parent 419479608a
commit 725510a443

View File

@@ -14,7 +14,12 @@ class User(List, Find, Create, Post, Update, Delete):
path = "users"
def gravatar(self, size=64):
"""Generate Gravatar link on the fly using the email value"""
"""Deprecated: return the Gravatar URL.
.. deprecated::
Use of Gravatar is deprecated, in favour of our self-hosted avatars.
See pillar.api.users.avatar.url(user).
"""
parameters = {'s':str(size), 'd':'mm'}
return "https://www.gravatar.com/avatar/" + \
hashlib.md5(self.email.lower()).hexdigest() + \