mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
Generate consistent gravatar hash values as per documentation.
The gravatar documentation on implementing the hash specifies that leading and trailing whitespace must be trimmed and all characters should be forced to lowercase. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
@@ -3,7 +3,8 @@ module ApplicationHelper
|
||||
|
||||
def gravatar_icon(user_email, size = 40)
|
||||
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
|
||||
|
||||
def fixed_mode?
|
||||
|
||||
Reference in New Issue
Block a user