Merge pull request #459 from patthoyts/pt/gravatar-fix
Generate consistent gravatar hash values as per documentation.
This commit is contained in:
commit
df6f748179
|
@ -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?
|
||||||
|
|
Loading…
Reference in a new issue