changeset 1330:c33842b1bd38 beta

Anonymous user shouldn't use gravatar, changed gravatar into regular hosted image.
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 12 May 2011 21:12:18 +0200
parents ea287ae3b901
children 1188920ae12c
files rhodecode/lib/helpers.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py	Thu May 12 19:49:22 2011 +0200
+++ b/rhodecode/lib/helpers.py	Thu May 12 21:12:18 2011 +0200
@@ -513,7 +513,8 @@
 #==============================================================================
 
 def gravatar_url(email_address, size=30):
-    if not str2bool(config['app_conf'].get('use_gravatar')):
+    if not str2bool(config['app_conf'].get('use_gravatar')) or \
+        email_address == 'anonymous@rhodecode.org':
         return "/images/user%s.png" % size
 
     ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme')