Commit df6f7481 authored by Ariejan de Vroom's avatar Ariejan de Vroom

Merge pull request #459 from patthoyts/pt/gravatar-fix

Generate consistent gravatar hash values as per documentation.
parents 1924de91 2be4fe28
...@@ -3,7 +3,8 @@ module ApplicationHelper ...@@ -3,7 +3,8 @@ module ApplicationHelper
def gravatar_icon(user_email, size = 40) def gravatar_icon(user_email, size = 40)
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=#{size}&d=identicon" user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
end end
def fixed_mode? def fixed_mode?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment